Is this behaviour correct? Should it even be legal to blindly allow access to members/fields via the .outer context pointer (that may not even be there as shown in this instance)?
class Outer { int w = 3; void method() { int x = 4; new class Object { this() { assert(w == 3); // Passes //assert(x == 4); // Passes assert(this.outer.w == 3); // Fails if above is uncommented } }; } } Regards