void () { runWithLanguageLevel( LanguageLevel.getLatest(), () -> doTestByText( """ from typing import Protocol class A: def f1(self, x: str): pass class B(A): def f2(self, y: str): pass class P(Protocol): def f1(self, x: str): ... def f2(self, y: str): ... def test(p: P): pass b = B() test(b)""" ) ); }