i = !0 @Inheritable C = Class() C::[<: Self] __init__! self = print! "initialize C:", self i.inc!() __del__! self = print! "delete C:", self i.dec!() p!() = c = C.new() assert i == 1 print! c p!() assert i == 0 D = Inherit C, Additional := { x = Int } D::[<: Self] @Override __init__! self = C::__init__! self print! "initialize D:", self, self::x _ = D.new { x = 1 }