struct S { int x; } struct T { S s; alias s this; void f() { x = 1; void wrapped() { x = 1; } // <-- 'x' not found, whereas 's.x' works fine } }
'this.x' also works fine there.
PR : https://github.com/dlang/dmd/pull/8814
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d8de5fd8562ce1cf0f56bf29493704587b327946 Fix Issue 19284 - alias this not used in nested functions of a method https://github.com/dlang/dmd/commit/7d6743dea041caa3c33866088a20172744d4e4bf Merge pull request #8814 from RazvanN7/Issue_19284 Fix Issue 19284 - alias this not used in nested functions of a method