void () { doTest("Derived", """ class Base: def instance(self): return self class Derived(Base): pass expr = Derived.instance(Derived())"""); doTest("Derived", """ class Base: def instance(self): return self class Derived(Base): pass expr = Derived().instance()"""); }