Invalid rename from Inline Method #60634
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
devexp-assist
Issues with analysis server assists
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Given a file containing the following:
Select the name of the local function
computeChangeHash
and invoke the "Inline Method" assist. The result will beThe reference to the local variable
changeBuilder
is erroneously changed tochangeBuilder2
.I suspect that this is because the assist doesn't know that the "method" being inlined is a local function and that local variables from outside the function are still valid to reference.
We probably need an "Inline Local Function" variant that knows what's being inlined. It will still need to be aware of the possibility of shadowing.
The text was updated successfully, but these errors were encountered: