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

24 lines
405 B
Kotlin
Vendored

// FILE: Simple.java
public interface Simple {
default String test(String s) {
return s + "K";
}
static String testStatic(String s) {
return s + "K";
}
}
// FILE: main.kt
interface TestInterface : Simple {}
class Test : TestInterface {}
fun box(): String {
val test = Test().test("O")
if (test != "OK") return "fail $test"
return Simple.testStatic("O")
}