Files
kotlin/compiler/testData/codegen/java8/box/delegationBy/inClassDeclaration.kt
Mikhael Bogdanov 268d55104c Don't generate delegation to java default methods
#KT-15226  Fixed
2016-12-14 11:20:04 +01:00

23 lines
330 B
Kotlin
Vendored

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