void () { doTestByText(""" from typing_extensions import Final, TypeAlias a1: Final[int] = 10 b1: List[<warning descr="'Final' could only be used as the outermost type">Final</warning>[int]] = [] a2 = 10 # type: Final[int] b2 = [] # type: List[<warning descr="'Final' could only be used as the outermost type">Final</warning>[int]] a3: Final = 10 b3: List[<warning descr="'Final' could only be used as the outermost type">Final</warning>] = [] a4 = 10 # type: Final b4 = [] # type: List[<warning descr="'Final' could only be used as the outermost type">Final</warning>] A1: TypeAlias = List[<warning descr="'Final' could only be used as the outermost type">Final</warning>[int]] A2: TypeAlias = 'List[<warning descr="'Final' could only be used as the outermost type">Final</warning>[int]]' A3 = List[<warning descr="'Final' could only be used as the outermost type">Final</warning>[int]] # type: TypeAlias A4 = 'List[<warning descr="'Final' could only be used as the outermost type">Final</warning>[int]]' # type: TypeAlias"""); }