K2: Do not fix variables that has yet unprocessed constraints in forks

Otherwise, exception from org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector.TypeCheckerStateForConstraintInjector.fixedTypeVariable
might happen during forks resolution

The test data is extracted from intelliJ FP test

^KT-43296 Fixed
This commit is contained in:
Denis.Zharkov
2022-11-02 18:51:20 +01:00
committed by Space Team
parent b73acd7a3a
commit ca12cfb90d
8 changed files with 122 additions and 2 deletions
@@ -15999,6 +15999,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/forks"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("nestedCallVariableFixation.kt")
public void testNestedCallVariableFixation() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/forks/nestedCallVariableFixation.kt");
}
@Test
@TestMetadata("nestedCallVariableFixationSimple.kt")
public void testNestedCallVariableFixationSimple() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/forks/nestedCallVariableFixationSimple.kt");
}
@Test
@TestMetadata("overloadResolutionByLambdaReturnTypeAndExpectedType.kt")
public void testOverloadResolutionByLambdaReturnTypeAndExpectedType() throws Exception {