mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-08 16:03:13 +01:00
Merged DMD commit 3803c7bdc266b45c102a9c5dd33bc788994dc3ea:
bugzilla 5180 ICE(arrayop.c) in-place array operation on incompatible types
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user