Files
kotlin-fork/compiler/testData/codegen/box/fir/smartCastToInvisibleClassMember.kt
T
Mikhail Glukhikh ec7caba8ea K2: restore smart cast in case with invisible receiver but visible callable
Related to KT-52432
#KT-63164 Fixed
2023-11-17 20:29:58 +00:00

26 lines
410 B
Kotlin
Vendored

// ISSUE: KT-63164
// DUMP_IR
// FIR_IDENTICAL
// MODULE: m1
// FILE: info.kt
internal class Info {
val status: String = "OK"
}
val info: Any? = Info()
// MODULE: m2(m1)
// FILE: box.kt
fun getStatus(param: Any?): String {
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
if (param is Info) {
return param.status
}
return "NO STATUS"
}
fun box(): String = getStatus(info)