[Issue 4494] ICE(cod1.c) Array literal filled with results of void function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 11 14:43:22 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4494
Iain Buclaw <ibuclaw at ubuntu.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #2 from Iain Buclaw <ibuclaw at ubuntu.com> 2011-04-11 14:39:36 PDT ---
diff --git a/src/expression.c b/src/expression.c
index 9d116b9..1bd9e42 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -3200,6 +3200,10 @@ Expression *ArrayLiteralExp::semantic(Scope *sc)
type = t0->arrayOf();
//type = new TypeSArray(t0, new IntegerExp(elements->dim));
type = type->semantic(loc, sc);
+
+ if (type->nextOf()->ty == Tvoid)
+ error("array literal of type void[] has no value");
+
return this;
}
--
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