void () { runWithLanguageLevel( LanguageLevel.PYTHON36, () -> doTestByText(""" class A: def f1(self) -> <error descr="Unresolved reference 'self'">self</error>.B: pass def f2(self): # type: () -> <warning descr="Unresolved reference 'self'">self</warning>.B pass def f3(self): v3: self.B v4 = None # type: self.B v1: <error descr="Unresolved reference 'self'">self</error>.B v2 = None # type: <warning descr="Unresolved reference 'self'">self</warning>.B class B: pass""") ); }