Files
kotlin/compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt
Mikhael Bogdanov c6511f465b Switch warning to error for java-default method calls within 1.6 target
#KT-15825 Fixed

(cherry picked from commit 9b29ebb)
2017-09-18 18:00:53 +03:00

23 lines
328 B
Kotlin
Vendored

// FILE: Base.java
public interface Base {
default String foo() {
return "OK";
}
}
// FILE: derived.kt
interface K1 : Base
interface K2 : K1
interface K3 : K2
class C : K3 {
@kotlin.Suppress("DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET")
override fun foo() = super.foo()
}
fun box(): String = C().foo()