mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
MPP-related: * inherited from interfaces * inherited body from interface * default arguments in an interface, implemented by a class delegate * super call of a method with default argument Also: * inheritance from an interface and another interface descendant (KT-21968) * inheritance through an intermediate interface
15 lines
223 B
Kotlin
Vendored
15 lines
223 B
Kotlin
Vendored
// See KT-21968
|
|
|
|
interface A {
|
|
fun f(cause: Int? = null): Boolean
|
|
}
|
|
|
|
open class B : A {
|
|
override fun f(cause: Int?): Boolean = true
|
|
}
|
|
|
|
class D : B(), A
|
|
|
|
fun box(): String {
|
|
return if (D().f()) "OK" else "fail"
|
|
} |