void () { doTest("A[int | str, int | str, list[int]]", """ from __future__ import annotations from typing import TypeVarTuple, Generic, Tuple, TypeVar T = TypeVar('T') T1 = TypeVar('T1') Ts = TypeVarTuple('Ts') class A(Generic[T, *Ts, T1]): def __init__(self, t: T, tpl: Tuple[*Ts], t1: T1) -> None: ... x: int | str expr = A(x, (x,), [1]) """); }