void () { doTest("str", "PZFunc[int, str]", """ from typing import TypeVar, Generic, Callable A = TypeVar('A') B = TypeVar('B') class PZFunc(Generic[A, B]): def __init__(self, f: Callable[[A], B]) -> None: self._f = f def foo(self, x: A) -> B: return self._f(x) @PZFunc def func(n: int) -> str: return str(n + 1) value = func.foo(5) dec_func = func"""); }