struct Base { int x; void foo() { writefln("%s", x); } } struct Derived { Base _base; alias _base this; int y; void bar() { writefln("%s, %s", x, y); } // line 16 } foo.d(16): Error: undefined identifier x But 'this.x' works.
*** Issue 6481 has been marked as a duplicate of this issue. ***
https://github.com/D-Programming-Language/dmd/pull/312
https://github.com/D-Programming-Language/dmd/commit/a1fd933b138f6f6a979d4b338fe8d72478b926a3