Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt
T
2018-06-14 19:54:30 +03:00

14 lines
191 B
Kotlin
Vendored

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()