April 10, 2023 [Issue 23833] New: auto dereferncing does work with alias this | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23833 Issue ID: 23833 Summary: auto dereferncing does work with alias this Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: james.gray@remss.net In the following code I would expect the three final lines to equivalent. Currently only the final two compile. ```d struct Int { int val; alias val this; } void main() { Int* x = new Int(123); void foo(int a) {} foo(x); foo(x.val); foo(*x); } ``` -- |
Copyright © 1999-2021 by the D Language Foundation