diff --git a/dmd/expression.c b/dmd/expression.c index 61555d1f..b485f551 100644 --- a/dmd/expression.c +++ b/dmd/expression.c @@ -4988,7 +4988,9 @@ Expression *BinExp::commonSemanticAssign(Scope *sc) if (e1->op == TOKslice) { // T[] op= ... - typeCombine(sc); + e = typeCombine(sc); + if (e->op == TOKerror) + return e; type = e1->type; return arrayOp(sc); } @@ -5026,7 +5028,9 @@ Expression *BinExp::commonSemanticAssignIntegral(Scope *sc) if (e1->op == TOKslice) { // T[] op= ... - typeCombine(sc); + e = typeCombine(sc); + if (e->op == TOKerror) + return e; type = e1->type; return arrayOp(sc); } @@ -8386,7 +8390,9 @@ Expression *AddAssignExp::semantic(Scope *sc) if (e1->op == TOKslice) { - typeCombine(sc); + e = typeCombine(sc); + if (e->op == TOKerror) + return e; type = e1->type; return arrayOp(sc); } @@ -8492,7 +8498,9 @@ Expression *MinAssignExp::semantic(Scope *sc) if (e1->op == TOKslice) { // T[] -= ... - typeCombine(sc); + e = typeCombine(sc); + if (e->op == TOKerror) + return e; type = e1->type; return arrayOp(sc); } @@ -8630,7 +8638,9 @@ Expression *MulAssignExp::semantic(Scope *sc) if (e1->op == TOKslice) { // T[] -= ... - typeCombine(sc); + e = typeCombine(sc); + if (e->op == TOKerror) + return e; type = e1->type; return arrayOp(sc); } @@ -8706,7 +8716,9 @@ Expression *DivAssignExp::semantic(Scope *sc) if (e1->op == TOKslice) { // T[] -= ... - typeCombine(sc); + e = typeCombine(sc); + if (e->op == TOKerror) + return e; type = e1->type; return arrayOp(sc); }