From bd6fef78414be1c83a67b2acb31c0fc3ab06eec7 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Fri, 14 Jan 2022 23:24:51 +0300 Subject: [PATCH] FIR: don't add partially resolved call in builder inference mode --- .../kotlin/fir/resolve/inference/FirCallCompleter.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt index 49117f70e68..243c231d75b 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt @@ -139,7 +139,9 @@ class FirCallCompleter( ConstraintSystemCompletionMode.PARTIAL -> { runCompletionForCall(candidate, completionMode, call, initialType, analyzer) - inferenceSession.addPartiallyResolvedCall(call) + if (inferenceSession !is FirBuilderInferenceSession) { + inferenceSession.addPartiallyResolvedCall(call) + } CompletionResult(call, false) }