mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
17 lines
314 B
Kotlin
Vendored
17 lines
314 B
Kotlin
Vendored
fun box(): String {
|
|
val sub = Sub()
|
|
val sup: Super = sub
|
|
|
|
sup.foo{ }
|
|
if (sub.lastCalled != "super") {
|
|
return "FAIL: ${sub.lastCalled} instead of super"
|
|
}
|
|
|
|
sub.foo{ }
|
|
if (sub.lastCalled != "sub") {
|
|
return "FAIL: ${sub.lastCalled} instead of sub"
|
|
}
|
|
|
|
return "OK"
|
|
}
|