FE: split test "buildList type argument is inferred into upper bound"
Related to KT-50520, KT-56169
This commit is contained in:
committed by
Space Team
parent
8edf8573b5
commit
ba2d896c01
+12
-6
@@ -36936,6 +36936,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBoundForbidden.kt")
|
||||
public void testBuildListToUpperBoundForbidden() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("completeIrrelevantCalls.kt")
|
||||
public void testCompleteIrrelevantCalls() throws Exception {
|
||||
@@ -36966,12 +36978,6 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt50520.kt")
|
||||
public void testKt50520() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt50520.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||
|
||||
+12
-6
@@ -36936,6 +36936,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBoundForbidden.kt")
|
||||
public void testBuildListToUpperBoundForbidden() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("completeIrrelevantCalls.kt")
|
||||
public void testCompleteIrrelevantCalls() throws Exception {
|
||||
@@ -36966,12 +36978,6 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt50520.kt")
|
||||
public void testKt50520() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt50520.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||
|
||||
+12
-6
@@ -37032,6 +37032,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBoundForbidden.kt")
|
||||
public void testBuildListToUpperBoundForbidden() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("completeIrrelevantCalls.kt")
|
||||
public void testCompleteIrrelevantCalls() throws Exception {
|
||||
@@ -37062,12 +37074,6 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt50520.kt")
|
||||
public void testKt50520() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt50520.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_TXT
|
||||
// !LANGUAGE: -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-50520
|
||||
|
||||
fun box(): String {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-50520
|
||||
|
||||
fun box(): String {
|
||||
buildList {
|
||||
val foo = { first() }
|
||||
add(0, foo)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.fir.kt
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: +ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-56169
|
||||
|
||||
fun box(): String {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
|
||||
val foo = { first() }
|
||||
add(0, foo)
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// SKIP_TXT
|
||||
// !LANGUAGE: +ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
|
||||
// ISSUE: KT-56169
|
||||
|
||||
fun box(): String {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
|
||||
Generated
+12
-6
@@ -37032,6 +37032,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBound.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBoundForbidden.kt")
|
||||
public void testBuildListToUpperBoundForbidden() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBoundForbidden.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("completeIrrelevantCalls.kt")
|
||||
public void testCompleteIrrelevantCalls() throws Exception {
|
||||
@@ -37062,12 +37074,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt48445.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt50520.kt")
|
||||
public void testKt50520() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/kt50520.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolveUsualCallWithBuilderInference.kt")
|
||||
public void testResolveUsualCallWithBuilderInference() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user