Files
kotlin/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt
2015-10-12 11:11:23 +02:00

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"
}