mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Error message for calling a function with a missing 'this' arg.
This commit is contained in:
parent
d9f85de2a1
commit
3db56c7a17
4 changed files with 37 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue