void () { doTestByText(""" from typing import Generic, TypeVarTuple, Tuple, Any Ts = TypeVarTuple('Ts') class Array(Generic[*Ts]): def __init__(self, shape: Tuple[*Ts]): ... def foo(x: Array[int, *Tuple[Any, ...], str]) -> None: ... x: Array[int, list[str], bool, str] foo(x) y: Array[int, str] foo(y) z: Array[int] foo(<warning descr="Expected type 'Array[int, *tuple[Any, ...], str]', got 'Array[int]' instead">z</warning>) t: Array[str] foo(<warning descr="Expected type 'Array[int, *tuple[Any, ...], str]', got 'Array[str]' instead">t</warning>) k: Array[int, int] foo(<warning descr="Expected type 'Array[int, *tuple[Any, ...], str]', got 'Array[int, int]' instead">k</warning>) """); }