digitalmars.D.bugs - [Issue 24421] New: expression `&B(A(1)).a` is not a constant
- d-bugmail puremagic.com (26/26) Feb 28 https://issues.dlang.org/show_bug.cgi?id=24421
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. --
Feb 28