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

25 lines
355 B
Kotlin
Vendored

// FILE: Test.java
interface Test<T> {
T call();
default T testDefault(T p) {
return p;
}
}
// FILE: main.kt
class Child : Test<String> {
override fun call() : String {
return "OK"
}
}
fun box(): String {
val res = Child().call()
if (res != "OK") return "fail $res"
return Child().testDefault("OK")
}