void () { runWithLanguageLevel( LanguageLevel.PYTHON35, () -> doTest("Iterator[int]", """ from typing import Iterator, Callable class Foo: def iterate(self) -> Iterator[int]: pass @property def foo(self) -> Callable[[], Iterator[int]]: return self.iterate expr = Foo().foo()""") ); }