Files
kotlin-fork/compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt
T
2023-06-07 14:59:38 +00:00

13 lines
256 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.test.assertEquals
fun String.sum(other: String = "b") = this + other
fun box(): String {
val f = String::sum
assertEquals("ab", f.callBy(mapOf(f.parameters.first() to "a")))
return "OK"
}