Files
kotlin-fork/compiler/testData/codegen/box/delegation/inClassDeclaration.kt
T
2023-10-17 12:46:27 +00:00

26 lines
373 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// 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()
}