void () { doTestByText(""" from typing import Callable, ParamSpec P = ParamSpec("P") def twice(f: Callable[P, int], *args: P.args, **kwargs: P.kwargs) -> int: return f(*args, **kwargs) + f(*args, **kwargs) def a_int_b_str(a: int, b: str) -> int: return a + len(b) res1 = twice(a_int_b_str, 1, "A") res2 = twice(a_int_b_str, b="A", a=1) res3 = twice(a_int_b_str, <warning descr="Expected type 'int', got 'str' instead">"A"</warning>, <warning descr="Expected type 'str', got 'int' instead">1</warning>) res4 = twice(a_int_b_str, <warning descr="Expected type 'str', got 'int' instead">b=1</warning>, <warning descr="Expected type 'int', got 'str' instead">a="A"</warning>)"""); }