[NI] Restore missing call checker errors in coroutine inference

Reported diagnostics from the call checkers didn't get to a top-level
trace, if an intermediate wrapping call was a lambda call.
Use of the top-level trace in call completer is a workaround for
the unreliable commit order of common calls' temporary traces.
^KT-33542 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-02-11 18:45:03 +03:00
parent 6af8f320f7
commit c02dd720dc
5 changed files with 60 additions and 1 deletions
@@ -242,7 +242,10 @@ class CoroutineInferenceSession(
val resultingSubstitutor =
NewTypeSubstitutorByConstructorMap((resultingCallSubstitutor + nonFixedTypesToResult).cast()) // TODO: SUB
val atomCompleter = createResolvedAtomCompleter(resultingSubstitutor, completedCall.context)
val atomCompleter = createResolvedAtomCompleter(
resultingSubstitutor,
completedCall.context.replaceBindingTrace(topLevelCallContext.trace)
)
completeCall(completedCall, atomCompleter)
}