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