Generate parameter name in sighelp when there is no public parameter name #10761
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a quirk I noticed when dogfooding the feature in the F# compiler codebase.
In the compiler, we have several functions where the public signature doesn't give a parameter name, but the definition (obviously) has a parameter name. From a caller's standpoint, there is no argument to display, even though it still exists. This leads to tooltips that look like this:
The
add2
function takes two parameters, but the public signature looks like this:I would argue that this signature is the actual problem, but we still need to handle it in tools. The approach I went with is to just use a generic
argX
name:Once the public signature is updated to have names, then those flow through in the tooltip instead.