class A var _e as E cue init base.init _e = F() def run if _e inherits F _e = _e.backUp _e.foo # access _e after it has been "backed up" to a higher type class E def foo pass class F inherits E get backUp as E return E() class Test def main is shared A().run