void () { runWithLanguageLevel( LanguageLevel.PYTHON35, () -> doTestByText( """ from typing import Callable class MainClass: pass class SubClass(MainClass): pass def f(p: Callable[[SubClass], int]): pass def g(p: MainClass) -> int: pass f(g)""" ) ); }