Files
kotlin-fork/backend.native/tests/external/codegen/box/classes/inheritedMethod.kt
T
2017-03-13 15:31:46 +03:00

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