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
@@ -14339,6 +14339,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/inference/builderInference/errorOnStubReceiver.kt");
}
@Test
@TestMetadata("invalidateKeys.kt")
public void testInvalidateKeys() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/builderInference/invalidateKeys.kt");
}
@Test
@TestMetadata("kt47744.kt")
public void testKt47744() throws Exception {
@@ -14339,6 +14339,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/inference/builderInference/errorOnStubReceiver.kt");
}
@Test
@TestMetadata("invalidateKeys.kt")
public void testInvalidateKeys() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/builderInference/invalidateKeys.kt");
}
@Test
@TestMetadata("kt47744.kt")
public void testKt47744() throws Exception {
@@ -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