void () { doTest("int", "(tt: str) -> int", """ from typing import Callable from functools import wraps from typing import TypeVar S = TypeVar('S') T = TypeVar('T') def dec1(t: T) -> Callable[[Callable[[], S]], Callable[[], T]]: pass def dec2(t: T): def dec(fun: Callable[[], S]): @wraps(fun) def wrapper(tt: T) -> S: return tt + fun() return wrapper return dec @dec2('sd') @dec1(1) def func() -> float: return 12.1 value = func('sd') dec_func = func"""); }