FE: don't run builder inference in UNTIL_FIRST_LAMBDA mode

#KT-52927 Fixed
This commit is contained in:
Mikhail Glukhikh
2022-09-05 19:25:27 +02:00
committed by Space
parent 8ee4cf46d3
commit e02fd8f4a8
9 changed files with 59 additions and 2 deletions
@@ -183,7 +183,7 @@ class ConstraintSystemCompleter(components: BodyResolveComponents, private val c
allTypeVariables: List<TypeConstructorMarker>,
analyze: (PostponedResolvedAtom) -> Unit
): Boolean {
if (completionMode == ConstraintSystemCompletionMode.PARTIAL) return false
if (completionMode != ConstraintSystemCompletionMode.FULL) return false
// If we use the builder inference anyway (if the annotation is presented), then we are already analysed builder inference lambdas
if (!languageVersionSettings.supportsFeature(LanguageFeature.UseBuilderInferenceOnlyIfNeeded)) return false