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