From 1284721437fb8da51d06e574d665cbfef602292e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sun, 10 Aug 2008 10:50:53 +0200 Subject: [PATCH] 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 --- gen/tocall.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gen/tocall.cpp b/gen/tocall.cpp index 43a04bf1..11ad4025 100644 --- a/gen/tocall.cpp +++ b/gen/tocall.cpp @@ -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);