Merged DMD commit 8fb6d9a935b7b51ca6caf8e26c94125fc317b434:

bugzilla 3665 Regression(1.051, 2.036) Assignment with array slicing does not work
This commit is contained in:
David Nadlinger
2011-04-22 14:43:56 +02:00
parent 3e28eecfea
commit def096c3ea

View File

@@ -55,8 +55,18 @@ bool isArrayOpValid(Expression *e)
case TOKxor:
case TOKand:
case TOKor:
case TOKassign:
case TOKaddass:
case TOKminass:
case TOKmulass:
case TOKdivass:
case TOKmodass:
case TOKxorass:
case TOKandass:
case TOKorass:
#if DMDV2
case TOKpow:
case TOKpowass:
#endif
return isArrayOpValid(((BinExp *)e)->e1) && isArrayOpValid(((BinExp *)e)->e2);
@@ -604,6 +614,19 @@ int Expression::isArrayOperand()
case TOKxor:
case TOKand:
case TOKor:
case TOKassign:
case TOKaddass:
case TOKminass:
case TOKmulass:
case TOKdivass:
case TOKmodass:
case TOKxorass:
case TOKandass:
case TOKorass:
#if DMDV2
case TOKpow:
case TOKpowass:
#endif
case TOKneg:
case TOKtilde:
return 1;