void () { doTestByText(""" from typing import TypeVar, TypeVarTuple, Callable, Tuple T = TypeVar('T') Ts = TypeVarTuple('Ts') def foo(f: Callable[[int, *Ts, T], Tuple[T, *Ts]]) -> None: ... def ok1(a: int, b: str, c: bool, d: list[int]) -> Tuple[list[int], str, bool]: ... def ok2(a: int, b: str) -> Tuple[str]: ... foo(ok1) foo(ok2) def err1(a: int, b: str, c: bool, d: list[int]) -> Tuple[list[int], str, str]: ... def err2(a: int, b: str) -> Tuple[str, str]: ... foo(<warning descr="Expected type '(int, str, bool, list[int]) -> tuple[list[int], str, bool]' (matched generic type '(int, *Ts, T) -> tuple[T, *Ts]'), got '(a: int, b: str, c: bool, d: list[int]) -> tuple[list[int], str, str]' instead">err1</warning>) foo(<warning descr="Expected type '(int, str) -> tuple[str]' (matched generic type '(int, *Ts, T) -> tuple[T, *Ts]'), got '(a: int, b: str) -> tuple[str, str]' instead">err2</warning>) """); }