Support KCallable.callBy with map of parameters to arguments
callBy is able to handle optional parameters. #KT-8827 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
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()))
|
||||
Reference in New Issue
Block a user