http://d.puremagic.com/issues/show_bug.cgi?id=7094
Summary: More initializers than struct fields for static member creation Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2011-12-11 02:32:31 PST --- D2 code: struct Foo { static f = Foo(0); // line 2 int x; } void main() {} DMD 2.057beta refuses it, but I think it's correct code: test.d(2): Error: more initializers than fields of Foo Workaround: define 'f' after x: struct Foo { int x; static f = Foo(0); // line 2 } void main() {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------