Files
kotlin-fork/compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt
T

12 lines
233 B
Kotlin
Vendored

// 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"
}