December 11, 2011 [Issue 7094] New: More initializers than struct fields for static member creation | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@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: ------- |
March 25, 2012 [Issue 7094] More initializers than struct fields for static member creation | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=7094 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from bearophile_hugs@eml.cc 2012-03-25 13:23:16 PDT --- *** This issue has been marked as a duplicate of issue 7742 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation