Files
kotlin-fork/compiler/testData/codegen/java8/box/delegationBy/byMiddleInterface.kt
T
2016-12-14 11:20:04 +01:00

28 lines
389 B
Kotlin
Vendored

// FILE: Base.java
public interface Base {
String getValue();
default String test() {
return getValue();
}
}
// FILE: main.kt
public interface BaseKotlin : Base {
}
class Fail : BaseKotlin {
override fun getValue() = "Fail"
}
fun box(): String {
val z = object : BaseKotlin by Fail() {
override fun getValue() = "OK"
}
return z.test()
}