simon.vergauwen
06/24/2019, 11:05 PMfun example(f: (String) -> Unit): Unit
into fun example(f: (stringParam: String) -> Unit): Unit
and refactor all usages of the lambda to use that name in my project?Dico
06/25/2019, 3:43 PMexample
. I believe it is also not retained in binaries at all.KFunction1
declares the parameter name, it can therefore not technically be different. Parameter names of lambda types might be a future feature, perhaps.example
or f
simon.vergauwen
06/25/2019, 3:46 PMf
, the reason I want to do this is to improve readability of library code. If I have to do it manually I probably still will but it'll suckDico
06/25/2019, 5:42 PMf
are all inside the example
function right.simon.vergauwen
06/25/2019, 6:03 PMexample
so whoever defines parameter names for the lambda. I want example { s ->}
to become example { stringParam ->}
in my code after the refactor.I dont think theres a point beyond claritySo no point for a library to do this? Or will IDEA still suggest the param name based on the Metadata?
Dico
06/25/2019, 6:22 PMsimon.vergauwen
06/25/2019, 6:25 PM