digitalmars.D.bugs - [Issue 9181] New: Forward reference error in struct static fields
- d-bugmail puremagic.com (31/31) Dec 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9181
http://d.puremagic.com/issues/show_bug.cgi?id=9181 Summary: Forward reference error in struct static fields Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc --- Comment #0 from bearophile_hugs eml.cc 2012-12-18 18:36:00 PST --- This program compiles with no errors: struct Foo { static immutable F = Foo(); static immutable Foo[] foos1 = [F]; } void main() {} If I remove the type of foos1 it doesn't compile: struct Foo { static immutable F = Foo(); static immutable foos1 = [F]; } void main() {} DMD 2.061alpha gives: test.d(3): Error: forward reference of variable F -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 18 2012