void () { doTest("Union[A, B]", """ from typing import Union class A(object): def __enter__(self): return self class B(object): def __enter__(self): return self def f(x): # type: (Union[A, B]) -> None with x as expr: pass"""); }