void () { runWithLanguageLevel( LanguageLevel.PYTHON37, () -> doTest("int", """ from typing_extensions import Protocol from typing import TypeVar T = TypeVar("T") class MyProto1(Protocol[T]): def func(self) -> T: pass class MyClass1(MyProto1[int]): pass expr = MyClass1().func()""") ); }