--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue Mar 04 15:45:20 2008 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Mar 06 10:07:25 2008 -0800
@@ -1609,17 +1609,10 @@
tree.getTag() - JCTree.ASGOffset,
owntype,
operand);
- if (types.isSameType(operator.type.getReturnType(), syms.stringType)) {
- // String assignment; make sure the lhs is a string
- chk.checkType(tree.lhs.pos(),
- owntype,
- syms.stringType);
- } else {
- chk.checkDivZero(tree.rhs.pos(), operator, operand);
- chk.checkCastable(tree.rhs.pos(),
- operator.type.getReturnType(),
- owntype);
- }
+ chk.checkDivZero(tree.rhs.pos(), operator, operand);
+ chk.checkCastable(tree.rhs.pos(),
+ operator.type.getReturnType(),
+ owntype);
}
result = check(tree, owntype, VAL, pkind, pt);
}