Reuse built functional types for postponed arguments by expected types and paths from a top level type variable
^KT-42221 Fixed
This commit is contained in:
+43
@@ -3384,6 +3384,49 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
public void testSuspendFunctions() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/suspendFunctions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Performance extends AbstractDiagnosticsTestWithStdLib {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPerformance() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForIdLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForIdLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForIdLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairOfLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairOfLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairOfLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairsOfDeepLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairsOfDeepLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairsOfDeepLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairsOfDeepMixedLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairsOfDeepMixedLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairsOfDeepMixedLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairsOfIdLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairsOfIdLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairsOfIdLambdas.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+43
@@ -3384,6 +3384,49 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
public void testSuspendFunctions() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/suspendFunctions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Performance extends AbstractDiagnosticsTestWithStdLibUsingJavac {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPerformance() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForIdLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForIdLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForIdLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairOfLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairOfLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairOfLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairsOfDeepLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairsOfDeepLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairsOfDeepLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairsOfDeepMixedLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairsOfDeepMixedLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairsOfDeepMixedLambdas.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reuseBuiltFunctionalTypesForPairsOfIdLambdas.kt")
|
||||
public void testReuseBuiltFunctionalTypesForPairsOfIdLambdas() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/performance/reuseBuiltFunctionalTypesForPairsOfIdLambdas.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user