[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
@@ -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 }
}