K1/K2: add a test to fix state of KT-55168
This commit is contained in:
committed by
Space Team
parent
d9b5d37baf
commit
3e330241b4
+6
@@ -37882,6 +37882,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListRemoveAddInBranches.kt")
|
||||
public void testBuildListRemoveAddInBranches() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
|
||||
+6
@@ -37882,6 +37882,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListRemoveAddInBranches.kt")
|
||||
public void testBuildListRemoveAddInBranches() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
|
||||
+6
@@ -37882,6 +37882,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListRemoveAddInBranches.kt")
|
||||
public void testBuildListRemoveAddInBranches() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
|
||||
+6
@@ -37996,6 +37996,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListRemoveAddInBranches.kt")
|
||||
public void testBuildListRemoveAddInBranches() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// ISSUE: KT-55168
|
||||
fun foo(arg: Boolean) = buildList {
|
||||
if (arg) {
|
||||
removeLast()
|
||||
} else {
|
||||
add(42)
|
||||
}
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// ISSUE: KT-55168
|
||||
fun foo(arg: Boolean) = buildList {
|
||||
if (arg) <!TYPE_MISMATCH!>{
|
||||
<!TYPE_MISMATCH!>removeLast()<!>
|
||||
}<!> else {
|
||||
add(42)
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -39610,6 +39610,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListRemoveAddInBranches.kt")
|
||||
public void testBuildListRemoveAddInBranches() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("buildListToUpperBound.kt")
|
||||
public void testBuildListToUpperBound() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user