blob: 4675849a8493d91cd3371db51c84eecce0932d55 [file]
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// FILE: Base.java
public interface Base {
String getValue();
default String test() {
return getValue();
}
}
// FILE: main.kt
public interface BaseKotlin : Base {
override fun getValue() = "OK"
override fun test(): String {
return getValue();
}
}
class OK : BaseKotlin {
override fun getValue() = "OK"
}
fun box(): String {
val ok = object : BaseKotlin by OK() {
override fun getValue() = "Fail"
}
return ok.test()
}