http://d.puremagic.com/issues/show_bug.cgi?id=4494


Iain Buclaw <ibuc...@ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #2 from Iain Buclaw <ibuc...@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: -------

Reply via email to