void () { runWithLanguageLevel( LanguageLevel.PYTHON34, () -> doTestByText( """ from typing import Any, Protocol class B: def foo(self): ... class C(B, Protocol): def bar(self): ... class Bar: def bar(self): ... def f(x: C) -> Any: ... f(Bar())""" ) ); }