For inner classes and mixins, it would be good to have a reference to the next outer scope. class C{ int i; // 1 class C1{ int i; // 2 void func( int a ){ i = a; // assign to 2 outer.i = a; // assign to 1 } } } In case of a mixin, outer is the scope of the instantiation. outer can be chained like outer.outer.func() to go out in scope two levels.