+= can go along with +

This commit is contained in:
Andrey Breslav
2011-03-15 21:28:58 +03:00
parent 349e3eb83a
commit dafa8f7230
@@ -587,18 +587,11 @@ public class JetTypeInferrer {
String name = assignmentOperationNames.get(operationType);
JetType assignmentOperationType = getTypeForBinaryCall(expression, name, scope, false);
String counterpartName = binaryOperationNames.get(assignmentOperationCounterparts.get(operationType));
JetType counterpartType = getTypeForBinaryCall(expression, counterpartName, scope, false);
if (assignmentOperationType != null) {
if (counterpartType != null) {
semanticServices.getErrorHandler().structuralError(operationSign.getNode(), "Ambiguity: both '" + name + "' and '" + counterpartName + "' are defined");
// TODO : make reference unresolved?
trace.removeReferenceResolution(operationSign);
} else {
result = assignmentOperationType;
}
if (assignmentOperationType == null) {
String counterpartName = binaryOperationNames.get(assignmentOperationCounterparts.get(operationType));
getTypeForBinaryCall(expression, counterpartName, scope, true);
}
result = null; // TODO : not an expression
}
else if (equalsOperations.contains(operationType)) {
String name = "equals";