mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 03:43:13 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user