Files
kotlin-fork/compiler/testData/codegen/java8/box/delegationBy/simple1.0.kt
T
2017-01-26 14:32:33 +01:00

23 lines
355 B
Kotlin
Vendored

// LANGUAGE_VERSION: 1.0
// 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()
}