On Monday, 9 February 2015 at 07:32:33 UTC, rumbu wrote:
class Outer { class Inner { static Inner createInner() {return new Inner(); //need 'this' to access member this} } }Is this a bug? If Inner is not nested, it works as expected: class Inner { static Inner createInner() { return new Inner() } } D version: 2.066.1
In the first case, is there an "Inner" that is visible outside of "Outer"? If so, the compiler wont know which one your talking about, so need to specify with this.