[Issue 4017] New: const initializer cannot evaluate size of forward referenced alias
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 27 06:00:39 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4017
Summary: const initializer cannot evaluate size of forward
referenced alias
Product: D
Version: 2.041
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: patch, rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: r.sagitario at gmx.de
--- Comment #0 from Rainer Schuetze <r.sagitario at gmx.de> 2010-03-27 06:00:38 PDT ---
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);
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list