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

Test that tuples should not be part of patterns #11012

Merged
merged 1 commit into from
May 4, 2016

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented May 2, 2016

@gafter for first review.

comp.VerifyDiagnostics(
// (6,18): error CS0150: A constant value is expected
// if (o is (1, 2))
Diagnostic(ErrorCode.ERR_ConstantExpected, "(1, 2)").WithLocation(6, 18)
Copy link
Member

@gafter gafter May 2, 2016

Choose a reason for hiding this comment

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

This one is a little worrying. It suggests that (1, 2) is being parsed as a tuple expression, which should not be possible in this context. But that will have to be sorted out later when we parse tuple patterns.

@gafter
Copy link
Member

gafter commented May 2, 2016

LGTM

@jcouv
Copy link
Member Author

jcouv commented May 2, 2016

@VSadov @dotnet/roslyn-compiler for a second review.

@jcouv
Copy link
Member Author

jcouv commented May 3, 2016

@VSadov for a second review. This one is pretty simple.

@VSadov
Copy link
Member

VSadov commented May 3, 2016

LGTM

@jcouv
Copy link
Member Author

jcouv commented May 4, 2016

@dotnet-bot Test prtest/lin/dbg/unit32 please

@jcouv jcouv merged commit ec016b2 into dotnet:future May 4, 2016
@jcouv jcouv deleted the tuple-patterns branch May 4, 2016 15:21
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