Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt
T
Mikhail Glukhikh 0d35033106 Introduction of CastedClassReceiver and its handling in codegen #KT-6744 Fixed
ClassReceiver converted to Kotlin
Also #KT-7617 Fixed
2015-11-10 20:20:51 +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()