Files
kotlin-fork/js/js.translator/testFiles/examples/cases/inheritedMethod.jet
T
2012-02-27 21:55:58 +04:00

14 lines
215 B
Plaintext

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