Skip to content

Fix NRE in DeclarationNameCompletionProvider#59361

Merged
genlu merged 5 commits into
dotnet:mainfrom
genlu:FixNre
Feb 9, 2022
Merged

Fix NRE in DeclarationNameCompletionProvider#59361
genlu merged 5 commits into
dotnet:mainfrom
genlu:FixNre

Conversation

@genlu
Copy link
Copy Markdown
Member

@genlu genlu commented Feb 8, 2022

Noticed this while debugging something else.

@genlu genlu requested a review from a team as a code owner February 8, 2022 01:37
@ghost ghost added the Area-IDE label Feb 8, 2022
@genlu genlu requested a review from sharwell February 8, 2022 19:24
@genlu genlu enabled auto-merge February 8, 2022 20:46
@genlu
Copy link
Copy Markdown
Member Author

genlu commented Feb 8, 2022

Oh wow, this is bad. It seems the provider is actually relying on the exception to have the right behavior.

genlu and others added 3 commits February 8, 2022 15:30
…clarationNameCompletionProvider.DeclarationInfo.cs

Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>

state.SendTypeChars("w")
Await state.AssertSelectedCompletionItem(displayText:="with", isHardSelected:=False)
Await state.AssertSelectedCompletionItem(displayText:="with", isHardSelected:=True)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the behavior change here. I believe previous behavior is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants