Files
kotlin/compiler/testData/codegen/java8/box/inheritKotlin.kt
2016-03-02 15:47:38 +03:00

32 lines
491 B
Kotlin
Vendored

// FILE: Simple.java
interface Simple extends KInterface {
default String test() {
return "simple";
}
}
// FILE: main.kt
interface KInterface {
fun test(): String {
return "base";
}
}
class Test : Simple {
fun bar(): String {
return super.test()
}
}
fun box(): String {
val test = Test().test()
if (test != "simple") return "fail $test"
val bar = Test().bar()
if (bar != "simple") return "fail 2 $bar"
return "OK"
}