NI: clean calls in coroutine inference before the second analysis of += only for right side

^KT-39660 Fixed
This commit is contained in:
Victor Petukhov
2020-06-18 12:34:52 +03:00
parent 1f66049a1e
commit ece61915de
9 changed files with 58 additions and 1 deletions
@@ -248,7 +248,7 @@ public class ExpressionTypingVisitorForStatements extends ExpressionTypingVisito
// Check for '+'
// We should clear calls info for coroutine inference within right side as here we analyze it a second time in another context
if (context.inferenceSession instanceof CoroutineInferenceSession) {
((CoroutineInferenceSession) context.inferenceSession).clearCallsInfoByContainingElement(expression);
((CoroutineInferenceSession) context.inferenceSession).clearCallsInfoByContainingElement(right);
}
Name counterpartName = OperatorConventions.BINARY_OPERATION_NAMES.get(OperatorConventions.ASSIGNMENT_OPERATION_COUNTERPARTS.get(operationType));
binaryOperationDescriptors = components.callResolver.resolveBinaryCall(