mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Merged DMD commit 504349171f38b724990bf3ee91ec02d4fc56874f:
bugzilla 5117 [CTFE] Member function call with rather complex this: side effects ignored
This commit is contained in:
@@ -226,6 +226,8 @@ Expression *FuncDeclaration::interpret(InterState *istate, Expressions *argument
|
||||
if (needThis() && istate)
|
||||
{
|
||||
VarDeclaration *thisvar = findParentVar(thisarg, istate->localThis);
|
||||
if (!thisvar) // it's a reference. Find which variable it refers to.
|
||||
thisvar = findParentVar(thisarg->interpret(istate), istate->localThis);
|
||||
for (size_t i = 0; i < istate->vars.dim; i++)
|
||||
{ VarDeclaration *v = (VarDeclaration *)istate->vars.data[i];
|
||||
if (v == thisvar)
|
||||
|
||||
Reference in New Issue
Block a user