### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java,v retrieving revision 1.59 diff -u -r1.59 CompoundAssignment.java --- compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 30 Jun 2009 14:24:18 -0000 1.59 +++ compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 15 Jul 2009 16:57:21 -0000 @@ -108,6 +108,8 @@ return null; } TypeBinding originalLhsType = this.lhs.resolveType(scope); + boolean expressionIsCast; + if ((expressionIsCast = this.expression instanceof CastExpression) == true) this.expression.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on TypeBinding originalExpressionType = this.expression.resolveType(scope); if (originalLhsType == null || originalExpressionType == null) return null; @@ -181,6 +183,10 @@ this.expression.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 8) & 0x0000F), originalExpressionType); this.preAssignImplicitConversion = (unboxedLhs ? BOXING : 0) | (lhsID << 4) | (result & 0x0000F); if (unboxedLhs) scope.problemReporter().autoboxing(this, lhsType, originalLhsType); + // check need for operand cast + if (expressionIsCast) { + CastExpression.checkNeedForArgumentCasts(scope, this.operator, result, this.lhs, originalLhsType.id, false, this.expression, originalExpressionType.id, true); + } return this.resolvedType = originalLhsType; }