[Issue 2850] New: bad codegen for struct static initializers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 17 23:35:32 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2850
Summary: bad codegen for struct static initializers
Product: D
Version: 2.012
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: clugdbug at yahoo.com.au
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);
}
--
More information about the Digitalmars-d-bugs
mailing list