diff --git a/dmd/interpret.c b/dmd/interpret.c index 7724abf1..2cf108de 100644 --- a/dmd/interpret.c +++ b/dmd/interpret.c @@ -2706,21 +2706,32 @@ Expression *CallExp::interpret(InterState *istate) Expression * pe = ((PtrExp*)ecall)->e1; if (pe->op == TOKvar) { VarDeclaration *vd = ((VarExp *)((PtrExp*)ecall)->e1)->var->isVarDeclaration(); - if (vd && vd->value && vd->value->op==TOKsymoff) + if (vd && vd->value && vd->value->op == TOKsymoff) fd = ((SymOffExp *)vd->value)->var->isFuncDeclaration(); else { ecall = vd->value->interpret(istate); - if (ecall->op==TOKsymoff) + if (ecall->op == TOKsymoff) fd = ((SymOffExp *)ecall)->var->isFuncDeclaration(); } } else ecall = ((PtrExp*)ecall)->e1->interpret(istate); + } + if (ecall == EXP_CANT_INTERPRET) + return ecall; + if (ecall->op == TOKindex) - ecall = e1->interpret(istate); + { ecall = e1->interpret(istate); + if (ecall == EXP_CANT_INTERPRET) + return ecall; + } + if (ecall->op == TOKdotvar && !((DotVarExp*)ecall)->var->isFuncDeclaration()) - ecall = e1->interpret(istate); + { ecall = e1->interpret(istate); + if (ecall == EXP_CANT_INTERPRET) + return ecall; + } if (ecall->op == TOKdotvar) { // Calling a member function