Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NRE in DeclarationNameCompletionProvider #59361

Merged
merged 5 commits into from
Feb 9, 2022
Merged

Conversation

genlu
Copy link
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
@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
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.

@@ -636,7 +636,7 @@ class C
showCompletionInArgumentLists:=showCompletionInArgumentLists, languageVersion:=LanguageVersion.Preview)

state.SendTypeChars("w")
Await state.AssertSelectedCompletionItem(displayText:="with", isHardSelected:=False)
Await state.AssertSelectedCompletionItem(displayText:="with", isHardSelected:=True)
Copy link
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