+= can go along with +
This commit is contained in:
@@ -587,18 +587,11 @@ public class JetTypeInferrer {
|
|||||||
String name = assignmentOperationNames.get(operationType);
|
String name = assignmentOperationNames.get(operationType);
|
||||||
JetType assignmentOperationType = getTypeForBinaryCall(expression, name, scope, false);
|
JetType assignmentOperationType = getTypeForBinaryCall(expression, name, scope, false);
|
||||||
|
|
||||||
String counterpartName = binaryOperationNames.get(assignmentOperationCounterparts.get(operationType));
|
if (assignmentOperationType == null) {
|
||||||
JetType counterpartType = getTypeForBinaryCall(expression, counterpartName, scope, false);
|
String counterpartName = binaryOperationNames.get(assignmentOperationCounterparts.get(operationType));
|
||||||
|
getTypeForBinaryCall(expression, counterpartName, scope, true);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
result = null; // TODO : not an expression
|
||||||
}
|
}
|
||||||
else if (equalsOperations.contains(operationType)) {
|
else if (equalsOperations.contains(operationType)) {
|
||||||
String name = "equals";
|
String name = "equals";
|
||||||
|
|||||||
Reference in New Issue
Block a user