void () { runWithLanguageLevel( LanguageLevel.PYTHON35, () -> doTestByText(""" from typing import Type, TypeVar class A: pass class B(A): pass class C: pass T = TypeVar('T', A, B) def f(cls: Type[T], arg: int) -> T: pass f(A, 1) f(B, 2) f(<warning descr="Expected type 'Type[T]', got 'Type[C]' instead">C</warning>, 3)""") ); }