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 ref and out keyword completion to appear in local functions #22374

Closed
wants to merge 1 commit into from

Conversation

chborl
Copy link
Contributor

@chborl chborl commented Sep 27, 2017

Fixes #22253

Customer scenario
If customer is in a local function, out and ref will not appear in the completion list when adding a parameter

Bugs this fixes:
#22253

Workarounds, if any
customer can type out or ref instead of choosing it from the completion list

Risk
Low, should only impact keyword completion feature

Performance impact
Low, minor code fix

Is this a regression from a previous update?
No

Root cause analysis:
Local functions were not included as a possible place for out and ref keywords to be offered in completion

How did we miss it? What tests are we adding to guard against it in the future?
Did not consider local functions. New tests have been added for ref and out

How was the bug found?
Issue filed by team member

Test documentation updated?
N/A

@chborl
Copy link
Contributor Author

chborl commented Sep 27, 2017

@dotnet/roslyn-ide

@@ -19,7 +19,8 @@ public static bool IsDelegateOrConstructorOrMethodParameterList(this SyntaxNode
return
node.IsParentKind(SyntaxKind.MethodDeclaration) ||
node.IsParentKind(SyntaxKind.ConstructorDeclaration) ||
node.IsParentKind(SyntaxKind.DelegateDeclaration);
node.IsParentKind(SyntaxKind.DelegateDeclaration) ||
node.IsParentKind(SyntaxKind.LocalFunctionStatement);
Copy link
Member

Choose a reason for hiding this comment

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

❗️ The method name appears to be misleading now.

@sharwell
Copy link
Member

sharwell commented Sep 27, 2017

@chborl I believe this was already fixed by #17447 which was merged into master with #22050.

@chborl
Copy link
Contributor Author

chborl commented Sep 27, 2017

Closing this PR. As @sharwell mentioned this has already been fixed. Thanks Sam!

@chborl chborl closed this Sep 27, 2017
@chborl
Copy link
Contributor Author

chborl commented Sep 28, 2017

Added tests for ref and out in another PR #22388

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

Successfully merging this pull request may close these issues.

Completion on out in local function impedes with typing
4 participants