diff gen/classes.cpp @ 422:fa91b03d9cd7

Error message for calling a function with a missing 'this' arg.
author Christian Kamm <kamm incasoftware de>
date Tue, 29 Jul 2008 10:29:52 +0200
parents ac1fcc138e42
children 3424f0fab7a9
line wrap: on
line diff
--- a/gen/classes.cpp	Mon Jul 28 21:37:47 2008 +0200
+++ b/gen/classes.cpp	Tue Jul 29 10:29:52 2008 +0200
@@ -798,7 +798,7 @@
     {
         DtoForceDeclareDsymbol(newexp->allocator);
         DFuncValue dfn(newexp->allocator, newexp->allocator->ir.irFunc->func);
-        DValue* res = DtoCallFunction(NULL, &dfn, newexp->newargs);
+        DValue* res = DtoCallFunction(newexp->loc, NULL, &dfn, newexp->newargs);
         mem = DtoBitCast(res->getRVal(), DtoType(tc), ".newclass_custom");
     }
     // default allocator
@@ -852,7 +852,7 @@
         assert(newexp->arguments != NULL);
         DtoForceDeclareDsymbol(newexp->member);
         DFuncValue dfn(newexp->member, newexp->member->ir.irFunc->func, mem);
-        return DtoCallFunction(tc, &dfn, newexp->arguments);
+        return DtoCallFunction(newexp->loc, tc, &dfn, newexp->arguments);
     }
 
     // return default constructed class