diff gen/classes.cpp @ 160:b77664331d06 trunk

[svn r176] Fixed a bug with class constructors.
author lindquist
date Sun, 04 May 2008 04:35:27 +0200
parents 5c17f81fc1c1
children a8cd9bc1021a
line wrap: on
line diff
--- a/gen/classes.cpp	Thu May 01 15:15:28 2008 +0200
+++ b/gen/classes.cpp	Sun May 04 04:35:27 2008 +0200
@@ -793,8 +793,11 @@
     }
 
     // call constructor
-    if (newexp->arguments)
+    if (newexp->member)
+    {
+        assert(newexp->arguments != NULL);
         return DtoCallClassCtor(tc, newexp->member, newexp->arguments, mem);
+    }
 
     // return default constructed class
     return new DImValue(tc, mem, false);