Ji Sungbin
05/14/2022, 10:21 AMmartmists
05/14/2022, 10:24 AMfun myFunction(object: Any) {
// ...
}
// no parameter named `argument`, but it's fine since it matches the type used internally: `(Any) -> Unit`
Test(::myFunction)
Ji Sungbin
05/14/2022, 10:31 AMfun test(content: (argument: Any) -> Unit) {
content(argument = "hi") // disallow
}
fun test2(argument: Any) {
test2(argument = "hi") // allow
}
hfhbd
05/14/2022, 10:42 AMhfhbd
05/14/2022, 10:42 AMJi Sungbin
05/14/2022, 10:43 AM