wake icon indicating copy to clipboard operation
wake copied to clipboard

[Bug] "textDocument/rename" request does not handle named parameters in function calls

Open DrakeEvans opened this issue 2 years ago • 1 comments

When using named function parameters during a function invocation, like foo({ bar: 42, paz: 36}). Rename action does not properly handle these named parameters

Reproduction Repo: https://github.com/DrakeEvans/tools-for-solidity-bug/blob/master/src/Counter.sol Steps:

  1. Highlight newNumber on line 9, execute renameAction

newNumber on lines 8 & 11 will be renamed but newNumber on line 15 is not.

From what I can see the list of references to rename is missing in the response. From reading the code this looks like it is built during compile time. If you point me in the right direction I can probably fix it myself but I cant find the code where the references are built. I found the rename function but dont know how to find the place the references are built by the compilation step

DrakeEvans avatar May 21 '23 18:05 DrakeEvans

Would also be great if this worked for natspec as well

DrakeEvans avatar May 22 '23 16:05 DrakeEvans