digitalmars.D.bugs - [Issue 15892] New: Can't use alias this with struct static member
- via Digitalmars-d-bugs (29/29) Apr 07 2016 https://issues.dlang.org/show_bug.cgi?id=15892
https://issues.dlang.org/show_bug.cgi?id=15892 Issue ID: 15892 Summary: Can't use alias this with struct static member Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: minor Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ntrel-pub mybtinternet.com With dmd 2.070.2: struct S { struct Static { static: int payload; } alias Static.payload this; // no identifier for declarator Static.payload alias get this; // OK ref property get(){return Static.payload;} } Same error if Static is moved outside of S. (This pattern is useful for grouping members and methods of S that shouldn't conflict with the symbol used with alias this). --
Apr 07 2016