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

Support logical operators in pattern matching #68

Closed
patrickt opened this issue Sep 23, 2020 · 4 comments · Fixed by #80
Closed

Support logical operators in pattern matching #68

patrickt opened this issue Sep 23, 2020 · 4 comments · Fixed by #80
Labels

Comments

@patrickt
Copy link
Contributor

C# 9.0 added and, or and not statements in pattern matching: dotnet/csharplang#2850

This feature is present in dotnet/roslyn:

            if (obj is not WorkspaceKindMetadata metadata)
                return false;
@patrickt patrickt added the bug label Sep 23, 2020
@damieng
Copy link
Contributor

damieng commented Sep 23, 2020

Do we want to use the "bug" tag for C# 9 support? It was ratified only recently. If we do any analysis in the future it might be nicer to break out what we thought was in but broken vs what C# added and we were playing catch-up?

@patrickt
Copy link
Contributor Author

patrickt commented Sep 24, 2020

@damieng I don’t have strong feelings re. that taxonomy—maybe @maxbrunsfeld does—but IMO this grammar should be able to parse as much of dotnet/roslyn as is possible, so departures from that are bugs.

@damieng
Copy link
Contributor

damieng commented Sep 24, 2020

So just as a heads up C# 9.0 isn't actually released until November with the release of .NET 5.0.

I agree we should add support - just wanted to clarify it's not a bug in the traditional sense - it's supporting new cutting-edge syntax.

@damieng
Copy link
Contributor

damieng commented Sep 24, 2020

One further point to make here - donet/roslyn is probably unique in that it is the only significantly-sized repo that is using C# 9.0 at this point in time.

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 a pull request may close this issue.

2 participants