Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt
T
2018-06-09 19:15:38 +03:00

15 lines
216 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
open class A {
open fun foo() = "FAIL"
fun bar() = if (this is C) foo() else foo()
}
open class B : A()
open class C : B() {
override fun foo() = "OK"
}
fun box() = C().bar()