void () { doTestByText(""" from typing import Self class Builder: def foo(self) -> Self: result = SubBuilder().bar() return <warning descr="Cannot return explicit class in self annotated function">result</warning> def bar(self) -> Self: pass class SubBuilder(Builder): pass """); }