Files
kotlin-fork/compiler/testData/codegen/box/reflection/callBy/defaultInSuperInterface.kt
T
2021-11-15 19:53:49 +03:00

31 lines
528 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR, JS, NATIVE, WASM
// IGNORE_BACKEND: JS_IR_ES6
// WITH_REFLECT
interface A1 {
fun test(o: String, k: String): String
}
interface A2 : A1
interface B1 {
fun test(o: String = "O", k: String = "K"): String
}
interface B2 : B1
interface C1
interface C2 : C1
interface D
interface E : A2, B2, C2 {
override fun test(o: String, k: String): String {
return o + k
}
}
class Z : D, E
fun box(): String {
val f = Z::test
return f.callBy(mapOf(f.parameters.first() to Z()))
}