Error message for calling a function with a missing 'this' arg.

This commit is contained in:
Christian Kamm 2008-07-29 10:29:52 +02:00
parent d9f85de2a1
commit 3db56c7a17
4 changed files with 37 additions and 28 deletions

View file

@ -798,7 +798,7 @@ DValue* DtoNewClass(TypeClass* tc, NewExp* newexp)
{
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 @@ DValue* DtoNewClass(TypeClass* tc, NewExp* newexp)
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