void () { doTestByText(""" from typing import Union, TypeAlias def a(b: <error descr="Generics should be specified through square brackets">Union(int, str)</error>): pass def c(d): # type: (<error descr="Generics should be specified through square brackets">Union(int, str)</error>) -> None pass def e(f: <error descr="Generics should be specified through square brackets">Union()</error>): pass def g(h): # type: (<error descr="Generics should be specified through square brackets">Union()</error>) -> None pass \s v1 = <error descr="Generics should be specified through square brackets">Union(int, str)</error> v2 = None # type: <error descr="Generics should be specified through square brackets">Union(int, str)</error> U = Union def i(j: <error descr="Generics should be specified through square brackets">U(int, str)</error>): pass \s v3 = <error descr="Generics should be specified through square brackets">U(int, str)</error> with foo() as bar: # type: <error descr="Generics should be specified through square brackets">Union(int,str)</error> pass \s for x in []: # type: <error descr="Generics should be specified through square brackets">Union(int,str)</error> pass \s A1: TypeAlias = <error descr="Generics should be specified through square brackets">Union(int, str)</error> A2: TypeAlias = '<error descr="Generics should be specified through square brackets">Union(int, str)</error>' A3 = <error descr="Generics should be specified through square brackets">Union(int, str)</error> # type: TypeAlias A3 = '<error descr="Generics should be specified through square brackets">Union(int, str)</error>' # type: TypeAlias"""); }