void () { doTest("int", """ from typing import Generic, TypeVar T1 = TypeVar('T1') T2 = TypeVar('T2') class Root(Generic[T1, T2]): def m(self) -> T2: pass class Base3(Root[T1, int]): pass class Base2(Base3[T1]): pass class Base1(Base2[T1]): pass class Sub(Base1[T1]): pass expr = Sub().m() """); }