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

Spec for patterns does not define the narrowed type for an ITuple-based pattern #44102

Closed
gafter opened this issue May 9, 2020 · 0 comments · Fixed by dotnet/csharplang#3891
Assignees
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers Documentation Feature - Pattern Matching Pattern Matching
Milestone

Comments

@gafter
Copy link
Member

gafter commented May 9, 2020

In PatternMatchingTests3.cs, we have a test that confirms that in

object o = new Q();
if (o is (3, 4) and var i) M(i);

Where Q is a class that implements System.Runtime.CompilerServices.ITuple, the type of i is System.Runtime.CompilerServices.ITuple. There is nothing in the current specifications that justifies that.

@gafter gafter added this to the 16.7 milestone May 9, 2020
@gafter gafter self-assigned this May 9, 2020
gafter pushed a commit to gafter/roslyn that referenced this issue May 9, 2020
gafter pushed a commit that referenced this issue May 9, 2020
@gafter gafter modified the milestones: 16.7, 16.8 Jun 24, 2020
@gafter gafter modified the milestones: 16.8, 16.9 Sep 11, 2020
gafter pushed a commit to gafter/csharplang that referenced this issue Sep 14, 2020
@gafter gafter added the 4 - In Review A fix for the issue is submitted for review. label Sep 14, 2020
gafter pushed a commit to dotnet/csharplang that referenced this issue Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers Documentation Feature - Pattern Matching Pattern Matching
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant