Files
kotlin-fork/compiler/testData/codegen/java8/box/delegationBy/simple.kt
T
2018-10-22 16:32:51 +02:00

23 lines
357 B
Kotlin
Vendored

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