comparison gen/tocall.cpp @ 488:993b217af574

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
author Christian Kamm <kamm incasoftware de>
date Sun, 10 Aug 2008 10:50:53 +0200
parents a34078905d01
children 642f6fa854e5
comparison
equal deleted inserted replaced
487:d7b2e8777e2b 488:993b217af574
239 239
240 // then comes a context argument... 240 // then comes a context argument...
241 if(thiscall || delegatecall || nestedcall) 241 if(thiscall || delegatecall || nestedcall)
242 { 242 {
243 // ... which can be a 'this' argument 243 // ... which can be a 'this' argument
244 if (thiscall) 244 if (thiscall && dfnval && dfnval->vthis)
245 { 245 {
246 assert(dfnval && dfnval->vthis);
247 LLValue* thisarg = DtoBitCast(dfnval->vthis, argiter->get()); 246 LLValue* thisarg = DtoBitCast(dfnval->vthis, argiter->get());
248 ++argiter; 247 ++argiter;
249 args.push_back(thisarg); 248 args.push_back(thisarg);
250 } 249 }
251 // ... or a delegate context arg 250 // ... or a delegate context arg