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

14 lines
181 B
Kotlin
Vendored

open class A {
class B : A() {
val a = "FAIL"
}
fun foo(): String {
if (this is B) return a
return "OK"
}
}
fun box(): String = A().foo()