← Back to index
|
Original Bugzilla link
Bug 4017 – const initializer cannot evaluate size of forward referenced alias
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-03-27T06:00:00Z
Last change time
2014-02-15T02:43:19Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0
by r.sagitario — 2010-03-27T06:00:38Z
struct _A { uint data; } const A_SIZE = (A.sizeof); alias _A A; yields: test.d(9): Error: size of type _A is not known Here's the patch Index: expression.c =================================================================== --- expression.c (revision 421) +++ expression.c (working copy) @@ -6096,6 +6096,7 @@ #endif else { + e1 = e1->semantic(sc); e = e1->type->dotExp(sc, e1, ident); if (!(flag && e->op == TOKdotti)) // let CallExp::semantic() handle this e = e->semantic(sc);
Comment #1
by bugzilla — 2011-02-07T21:04:28Z
Can't reproduce the error.
Comment #2
by clugdbug — 2011-02-07T22:41:54Z
Yup, fixed in 2.048 and 1.063.