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

IOperation support for new pattern forms in C# 9.0. #42474

Merged
merged 3 commits into from
Mar 18, 2020

Conversation

gafter
Copy link
Member

@gafter gafter commented Mar 16, 2020

No description provided.

@gafter gafter added this to the Compiler.Net5 milestone Mar 16, 2020
@gafter gafter requested a review from a team as a code owner March 16, 2020 18:15
@gafter gafter self-assigned this Mar 16, 2020
@333fred 333fred self-assigned this Mar 17, 2020
@333fred
Copy link
Member

333fred commented Mar 17, 2020

@gafter you're missing the updated XML file. Will look when that is pushed.

Change type of INegatedPattern.NegatedPattern and IBinaryPattern.LeftPattern and RightPattern to IPatternOperation
Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

Are you planning on adding CFG support in this PR? If not, please add a PROTOTYPE comment to address. Otherwise, LGTM

@gafter
Copy link
Member Author

gafter commented Mar 18, 2020

Remaining work is tracked in #41502


In reply to: 376487045 [](ancestors = 376487045)

@gafter
Copy link
Member Author

gafter commented Mar 18, 2020

@agocke Could you please look at this?

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

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

LGTM

@gafter gafter merged commit eec6270 into dotnet:features/patterns3 Mar 18, 2020
Assert.Same(operation.NegatedPattern, operation.Children.Single());
}

public override void VisitTypePattern(ITypePatternOperation operation)
Copy link
Contributor

@AlekseyTs AlekseyTs Mar 18, 2020

Choose a reason for hiding this comment

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

ITypePatternOperation [](start = 46, length = 21)

Consider asserting MatchedType is not null. #Pending

Copy link
Member Author

Choose a reason for hiding this comment

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

Will address in #42548


In reply to: 394690849 [](ancestors = 394690849)

@@ -1120,6 +1120,38 @@ public override void VisitConstantPattern(IConstantPatternOperation operation)
Assert.Same(operation.Value, operation.Children.Single());
}

public override void VisitRelationalPattern(IRelationalPatternOperation operation)
Copy link
Contributor

@AlekseyTs AlekseyTs Mar 18, 2020

Choose a reason for hiding this comment

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

IRelationalPatternOperation [](start = 52, length = 27)

Consider asserting OperatorKind #Pending

Copy link
Member Author

Choose a reason for hiding this comment

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

Will address in #42548


In reply to: 394691115 [](ancestors = 394691115)

gafter pushed a commit to gafter/roslyn that referenced this pull request Mar 19, 2020
gafter pushed a commit that referenced this pull request Mar 20, 2020
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