Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/kt51460.kt
T
Dmitriy Novozhilov 6e2402620f [FIR] Fix collecting member candidates on receiver with smartcast
^KT-51460 Fixed
^KT-51827
2022-04-07 12:18:48 +00:00

19 lines
330 B
Kotlin
Vendored

// FIR_IDENTICAL
// ISSUE: KT-51460
abstract class A {
abstract protected val a: A?
class B(override val a: A?) : A() {
fun f(other: A) {
val x = if (other is C) {
other.a
} else {
null
}
}
}
class C(override val a: A?): A()
}