Add expected type constraints in a builder inference call

This commit is contained in:
Victor Petukhov
2021-04-29 11:26:59 +03:00
parent 7da47dcde8
commit 90066d7e50
9 changed files with 165 additions and 4 deletions
@@ -12686,6 +12686,22 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference/addingConstraints")
@TestDataPath("$PROJECT_ROOT")
public class AddingConstraints {
@Test
public void testAllFilesPresentInAddingConstraints() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference/addingConstraints"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("bySpecifiedReturnType.kt")
public void testBySpecifiedReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/builderInference/addingConstraints/bySpecifiedReturnType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference/stubTypes")
@TestDataPath("$PROJECT_ROOT")
@@ -12686,6 +12686,22 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference/addingConstraints")
@TestDataPath("$PROJECT_ROOT")
public class AddingConstraints {
@Test
public void testAllFilesPresentInAddingConstraints() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/builderInference/addingConstraints"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("bySpecifiedReturnType.kt")
public void testBySpecifiedReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/builderInference/addingConstraints/bySpecifiedReturnType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/inference/builderInference/stubTypes")
@TestDataPath("$PROJECT_ROOT")