Bug 2850 – bad codegen for struct static initializers
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-04-18T01:35:00Z
Last change time
2015-06-09T01:14:37Z
Keywords
wrong-code
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2009-04-18T01:35:38Z
This assert fails at runtime. The initialization doesn't happen.
Struct literals work. Also "enum Test test = { 714 }; " works.
-----
struct Test{
int foo;
}
enum Test test = { foo:714 };
void main(){
assert(test.foo == 714);
}