Closed BigBahss closed 3 years ago
There's a couple limitations with this feature.
First, it only tracks changes to a single function signature. That means (for example) if you change one function signature and then start editing another, the changes to the first will be forgotten. This limitation probably won't be a big deal, but might be annoying if you forget to update the signature before editing another.
Second, there might be some problems when parameters do not have names, or if the names between declaration/definition are inconsistent. This is a difficult problem to solve.
Another limitation that I forgot to mention is that other references to the function will not be changed, this feature only synchronizes the definition and declaration.
This feature adds a code-action to synchronize a function's signature between it's declaration and definition. After changing a function's signature, the light-bulb will pop up to prompt you to update the declaration/definition of the function (if that function had a matching declaration/definition). This feature automatically detects changes to function signatures as you type, which makes editing feel natural as there is no need to indicate beforehand that you want to change a function's signature.