Bug 1473 – regression: forward references in const struct/union initializers upset dmd

Status
RESOLVED
Resolution
WORKSFORME
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-09-05T14:33:00Z
Last change time
2014-02-17T22:50:46Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
h3r3tic
Blocks
340

Comments

Comment #0 by h3r3tic — 2007-09-05T14:33:34Z
const Foo foo = { bar: 0 }; struct Foo { long bar; } // ---- Error: 'bar' is not a member of 'Foo' There's no line number reported, works fine in dmd 1.020. Works when you put the const after Foo's definition. hmm... First! :D // bug reported for 1.021 :P
Comment #1 by h3r3tic — 2008-06-28T06:31:22Z
Seems to work with recent DMD versions :)