SignatureHelp: fix display or ref-returning indexer#24359
Merged
jcouv merged 1 commit intodotnet:dev15.6.xfrom Jan 22, 2018
Merged
SignatureHelp: fix display or ref-returning indexer#24359jcouv merged 1 commit intodotnet:dev15.6.xfrom
jcouv merged 1 commit intodotnet:dev15.6.xfrom
Conversation
Member
Author
|
@dotnet/roslyn-ide for review for 15.6. Thanks |
sharwell
approved these changes
Jan 22, 2018
Member
Author
|
Thanks! |
Pilchie
approved these changes
Jan 22, 2018
Member
|
Approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Customer scenario
SignatureHelp on a ref-returning or ref-readonly-returning indexer should display the "ref" or "ref readonly" modifiers, as the screenshot shows (post fix).
Bugs this fixes
Fixes #24311
Risk
Performance impact
Low. Just adding a check for ref-returning symbols in the SignatureHelp and adding a couple of parts to display when appropriate.
Is this a regression from a previous update?
No
Root cause analysis
The SignatureHelper only relies on the SymbolDisplayVisitor to display parts of an indexer's signature. The SymbolDisplayVisitor would display
ref int C.this[...], but the SignatureHelper wants to displayref int C[...]. This non-standard behavior is the reason why the fix in SymbolDisplayVisitor did not automatically handle this scenario.How was the bug found?
Reported by customer.
@dotnet/roslyn-ide for review. Thanks
Tagging @VSadov @OmarTawfik as FYI