[FIR] Reproduce KT-62473

This commit is contained in:
Nikolay Lunyak
2023-10-10 15:36:35 +03:00
committed by Space Team
parent bae8b283c7
commit 54e9cafc73
7 changed files with 50 additions and 0 deletions
@@ -1251,6 +1251,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/suppressInWhen.kt");
}
@Test
@TestMetadata("suppressOnPlusAssign.kt")
public void testSuppressOnPlusAssign() throws Exception {
runTest("compiler/testData/diagnostics/tests/suppressOnPlusAssign.kt");
}
@Test
@TestMetadata("suspendConflictingOverloads.kt")
public void testSuspendConflictingOverloads() throws Exception {
@@ -1251,6 +1251,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/suppressInWhen.kt");
}
@Test
@TestMetadata("suppressOnPlusAssign.kt")
public void testSuppressOnPlusAssign() throws Exception {
runTest("compiler/testData/diagnostics/tests/suppressOnPlusAssign.kt");
}
@Test
@TestMetadata("suspendConflictingOverloads.kt")
public void testSuspendConflictingOverloads() throws Exception {
@@ -1251,6 +1251,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/suppressInWhen.kt");
}
@Test
@TestMetadata("suppressOnPlusAssign.kt")
public void testSuppressOnPlusAssign() throws Exception {
runTest("compiler/testData/diagnostics/tests/suppressOnPlusAssign.kt");
}
@Test
@TestMetadata("suspendConflictingOverloads.kt")
public void testSuspendConflictingOverloads() throws Exception {
@@ -1251,6 +1251,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/suppressInWhen.kt");
}
@Test
@TestMetadata("suppressOnPlusAssign.kt")
public void testSuppressOnPlusAssign() throws Exception {
runTest("compiler/testData/diagnostics/tests/suppressOnPlusAssign.kt");
}
@Test
@TestMetadata("suspendConflictingOverloads.kt")
public void testSuspendConflictingOverloads() throws Exception {
@@ -0,0 +1,10 @@
// ISSUE: KT-62473
// WITH_STDLIB
class A(val list: List<*>)
fun test(a: A) {
val result = mutableListOf<Int>()
@Suppress("UNCHECKED_CAST")
result += (a.list <!UNCHECKED_CAST!>as List<Int><!>).filter { it > 0 }
}
@@ -0,0 +1,10 @@
// ISSUE: KT-62473
// WITH_STDLIB
class A(val list: List<*>)
fun test(a: A) {
val result = mutableListOf<Int>()
@Suppress("UNCHECKED_CAST")
result += (a.list as List<Int>).filter { it > 0 }
}
@@ -1251,6 +1251,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/suppressInWhen.kt");
}
@Test
@TestMetadata("suppressOnPlusAssign.kt")
public void testSuppressOnPlusAssign() throws Exception {
runTest("compiler/testData/diagnostics/tests/suppressOnPlusAssign.kt");
}
@Test
@TestMetadata("suspendConflictingOverloads.kt")
public void testSuspendConflictingOverloads() throws Exception {