mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
14 lines
181 B
Kotlin
Vendored
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()
|