void () { doTestByText(""" from typing import Self class A: pass class B: def foo(self: Self): assert isinstance(A(), <error descr="'Self' cannot be used with instance and class checks">Self</error>) assert issubclass(A, <error descr="'Self' cannot be used with instance and class checks">Self</error>) """); }