February 28 [Issue 24421] New: expression `&B(A(1)).a` is not a constant | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24421 Issue ID: 24421 Summary: expression `&B(A(1)).a` is not a constant Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: ellapaul392@gmail.com ```d struct A { int i; } struct B { A a; } __gshared const B b = {a:{1}}; __gshared const A* aptr = &b.a; ``` Error: expression `&B(A(1)).a` is not a constant aptr is a const, and can be resolved at compile time. -- |
Copyright © 1999-2021 by the D Language Foundation