Files
kotlin-fork/compiler/testData/codegen/box/delegation/simple1.0.kt
T
2019-11-19 11:00:09 +03:00

26 lines
453 B
Kotlin
Vendored

// !LANGUAGE: -NoDelegationToJavaDefaultInterfaceMembers
// IGNORE_BACKEND_FIR: JVM_IR
// SKIP_JDK6
// TARGET_BACKEND: JVM
// FILE: Base.java
public interface Base {
String getValue();
default String test() {
return getValue();
}
}
// FILE: main.kt
class OK : Base {
override fun getValue() = "OK"
}
fun box(): String {
val z = object : Base by OK() {
override fun getValue() = "Fail"
}
return z.test()
}