mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Merged DMD commit ba365d098576e39859d02f3dd9eaac7e682c9c7f:
bugzilla 4949 ICE on invalid static if using value of 'this'
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user