Perhaps this is a better channel to ask this quest...
# intellij
s
Perhaps this is a better channel to ask this question :)
m
What does that code even do? First, I thought it was invalid, but I see using a Scratch file that it compiles. BUT I don't see what it does, if anything. In example, stringParam isn't available, so the name doesn't do anything. At my call site, the first parameter to the Lambda is still called
it
. Do you see something different? I suspect what you want is all call sites of
example
to change from
Copy code
example {
    it.subString(1)
}
to this automatically?
Copy code
example { stringParam ->
    stringParam.subString(1)
}
If that's ultimately what you're after, I'm not aware of a way to automatically do it.
s
Yes, that's exactly what I am after. The purpose of defining such param names is pure UX. If it's retained in
@Metadata
then IDEs or a lang server can read it out and provide better naming suggestions for auto completion etc.
m
An interesting idea, and helpful to avoid everything being
it
, and potentially ambiguous.