593937d302
callBy is able to handle optional parameters. #KT-8827 Fixed
9 lines
208 B
Kotlin
Vendored
9 lines
208 B
Kotlin
Vendored
class A(val result: String = "OK") {
|
|
fun foo(x: Int = 42): String {
|
|
assert(x == 42) { x }
|
|
return result
|
|
}
|
|
}
|
|
|
|
fun box(): String = A::foo.callBy(mapOf(A::foo.parameters.first() to A()))
|