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

Implement SymbolInfo for the property name of a property pattern #9233

Merged
merged 2 commits into from
Feb 28, 2016

Conversation

gafter
Copy link
Member

@gafter gafter commented Feb 26, 2016

@gafter gafter self-assigned this Feb 26, 2016
@gafter gafter added this to the 2.0 (Preview) milestone Feb 26, 2016
@@ -496,6 +496,11 @@ internal virtual IOperation GetOperationWorker(CSharpSyntaxNode node, GetOperati
public abstract SymbolInfo GetSymbolInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// Gets the symbol information for the property of a sub-property pattern.
/// </summary>
public abstract SymbolInfo GetSymbolInfo(SubPropertyPatternSyntax node, CancellationToken cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

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

Should add a default value for cancellationToken here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine, though there are no clients that would use it. The enclosing class is internal.

@gafter
Copy link
Member Author

gafter commented Feb 27, 2016

OK, I've made a bunch of changes per review comments. Please let me know if there are any new issues.

gafter added a commit that referenced this pull request Feb 28, 2016
Implement SymbolInfo for the property name of a property pattern
@gafter gafter merged commit 092bab9 into dotnet:features/patterns Feb 28, 2016
p = propPats[1]; // NotFound is 4
si = model.GetSymbolInfo(p);
Assert.Null(si.Symbol);
Assert.Equal(CandidateReason.None, si.CandidateReason);
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing test for LookupResultKind.Ambiguous, it looks like this change explicitly introduces a case when it can happen.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. Filed a separate PR for that, and a new bug because the SymbolInfo does not contain candidates.

@AlekseyTs
Copy link
Contributor

LGTM

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.

4 participants