From 43f3fe1ebe79668f7c9d7e57e26984f6b75e28f8 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Wed, 26 May 2021 12:30:07 +0300 Subject: [PATCH] FIR: Avoid missing errors during delegation resolution Merge inference errors from delegation partially resolved calls to the main system --- .../inference/FirDelegatedPropertyInferenceSession.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirDelegatedPropertyInferenceSession.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirDelegatedPropertyInferenceSession.kt index e01f57eb706..ce8f413e2d7 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirDelegatedPropertyInferenceSession.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirDelegatedPropertyInferenceSession.kt @@ -80,6 +80,13 @@ class FirDelegatedPropertyInferenceSession( ) } } + + for ((_, candidate) in partiallyResolvedCalls) { + for (error in commonSystem.errors) { + candidate.system.addError(error) + } + } + resultingConstraintSystem = commonSystem return resolvedCalls }