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

Add a test for an ambiguous property reference in pattern matching. #9285

Merged
merged 1 commit into from
Feb 29, 2016

Conversation

gafter
Copy link
Member

@gafter gafter commented Feb 28, 2016

@gafter gafter self-assigned this Feb 28, 2016
@gafter gafter added this to the 2.0 (Preview) milestone Feb 28, 2016
gafter added a commit that referenced this pull request Feb 29, 2016
Add a test for an ambiguous property reference in pattern matching.
@gafter gafter merged commit c2c5377 into dotnet:features/patterns Feb 29, 2016
);
var tree = compilation.SyntaxTrees.Single();
var model = compilation.GetSemanticModel(tree);
var propPats = tree.GetRoot().DescendantNodes().OfType<SubPropertyPatternSyntax>().ToArray();
Copy link
Contributor

Choose a reason for hiding this comment

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

Single() rather than ToArray() ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it could be done either way. I left it this way because it will make it easier to copy and paste to produce similar tests but having more than one sub property pattern.

@gafter gafter deleted the testAmbiguousProperty branch May 24, 2018 19:05
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.

3 participants