mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
14 lines
213 B
Kotlin
14 lines
213 B
Kotlin
open class Foo {
|
|
fun xyzzy(): String = "xyzzy"
|
|
}
|
|
|
|
class Bar(): Foo() {
|
|
fun test(): String = xyzzy()
|
|
}
|
|
|
|
fun box() : String {
|
|
val bar = Bar()
|
|
val f = bar.test()
|
|
return if (f == "xyzzy") "OK" else "fail"
|
|
}
|