void () { runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText(""" class MyCls: def __call__(self): return True class DifferentCls: def __call__(self): return True def foo(arg: MyCls): pass foo(MyCls()) foo(<warning descr="Expected type 'MyCls', got 'DifferentCls' instead">DifferentCls()</warning>)""") ); }