http://d.puremagic.com/issues/show_bug.cgi?id=5954
Summary: enum structs with ctor Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-05-07 16:31:20 PDT --- D2 code: struct Foo { int x; this(int xx) { this.x = xx; } } void main() { enum f = Foo(10); } DMD 2.053beta is not able to compile it, and shows the errors: test.d(8): Error: variable __ctmp3 cannot be read at compile time test.d(8): Error: cannot evaluate __ctmp3.this(10) at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------