Error if there is no this in a call requiring this.

Fixes:
nocompile/b/bug_type_308_G,H
nocompile/bug_e2ir_814
nocompile/i/inline_18_A,B
nocompile/inline_07
nocompile/static_09
This commit is contained in:
Christian Kamm
2008-08-10 10:50:53 +02:00
parent 646679fd44
commit 1284721437

View File

@@ -241,9 +241,8 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
if(thiscall || delegatecall || nestedcall)
{
// ... which can be a 'this' argument
if (thiscall)
if (thiscall && dfnval && dfnval->vthis)
{
assert(dfnval && dfnval->vthis);
LLValue* thisarg = DtoBitCast(dfnval->vthis, argiter->get());
++argiter;
args.push_back(thisarg);