void () { doTestByText(""" from typing import Union, TypeVar T = TypeVar("T", bytes, str) my_union = Union[str, set[T]] another_union = Union[list[str], my_union[T]] def foo(path_or_buf: another_union[T] | None) -> None: print(path_or_buf) """); }