void () { doTestByText(""" from typing import Callable, ParamSpec P = ParamSpec("P") def changes_return_type_to_str(x: Callable[P, int]) -> Callable[P, str]: def inner(*args: P.args, **kwargs: P.kwargs) -> str: return "42" return inner def returns_int(a: str, b: bool) -> int: return 42 f = changes_return_type_to_str(returns_int) res2 = f(a="A", b=True)"""); }