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

26 lines
396 B
Kotlin
Vendored

// 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 Fail : Base {
override fun getValue() = "Fail"
}
class Derived : Base by Fail() {
override fun getValue() = "OK"
}
fun box(): String {
return Derived().test()
}