void () { doTestByText(""" from typing import Self, Callable class MyClass: def foo(self, bar: Type[Self]) -> None: ... class SubClass(MyClass): pass myClass = MyClass() subClass = MySubClass() myClass.foo(myClass) myClass.foo(subClass) myClass.foo(MyClass) myClass.foo(SubClass) subClass.foo(myClass) subClass.foo(subClass) subClass.foo(MyClass) subClass.foo(SubClass)"""); }