[NI] Don't report overload ambiguity for error candidates

This commit is contained in:
Dmitriy Novozhilov
2019-04-19 11:38:15 +03:00
parent 00c76593f2
commit c86b8da982
@@ -270,7 +270,9 @@ class PSICallResolver(
if (resolvedCalls.first().status == ResolutionStatus.INCOMPLETE_TYPE_INFERENCE) {
tracingStrategy.cannotCompleteResolve(trace, resolvedCalls)
} else {
tracingStrategy.ambiguity(trace, resolvedCalls)
if (!resolvedCalls.all { it.isNewNotCompleted() }) {
tracingStrategy.ambiguity(trace, resolvedCalls)
}
}
}
return ManyCandidates(resolvedCalls)