August 28 [Issue 24730] New: Cannot initialize ref variable through `alias this` | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24730 Issue ID: 24730 Summary: Cannot initialize ref variable through `alias this` Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: maxsamukha@gmail.com struct S {} struct S2 { S s; alias this = s; } void main() { S2 s2; ref S s = s2; } a.d(14): Error: type `S2` cannot be assigned to `ref S s` -- |
Copyright © 1999-2021 by the D Language Foundation