28 lines
426 B
Kotlin
Vendored
28 lines
426 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// JVM_TARGET: 1.8
|
|
// IGNORE_BACKEND_K2: ANY
|
|
// Ignore reason: KT-62334
|
|
// 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()
|
|
}
|