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

Give an example of unmatched patterns in non-exhaustive switch warnings #43943

Closed
alrz opened this issue May 4, 2020 · 0 comments · Fixed by #44702
Closed

Give an example of unmatched patterns in non-exhaustive switch warnings #43943

alrz opened this issue May 4, 2020 · 0 comments · Fixed by #44702
Assignees
Labels
3 - Working Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. New Language Feature - Pattern Matching Pattern Matching
Milestone

Comments

@alrz
Copy link
Member

alrz commented May 4, 2020

F# does this and it could be quite useful for complex pattern switches

let f a b =
    match a, b with
    | 1, 2 -> ()

warning FS0025: Incomplete pattern matches on this expression. For example, the value '(_,0)' may indicate a case not covered by the pattern(s).

@jinujoseph jinujoseph added Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. labels May 7, 2020
@gafter gafter added this to the Backlog milestone May 13, 2020
@gafter gafter modified the milestones: Backlog, 16.7.P3 May 26, 2020
@gafter gafter self-assigned this May 26, 2020
gafter pushed a commit to gafter/roslyn that referenced this issue Jun 10, 2020
@jinujoseph jinujoseph modified the milestones: 16.7.P3, 16.7.P4 Jun 19, 2020
gafter pushed a commit that referenced this issue Jun 23, 2020
* When reporting a switch is not exhaustive, give an example why.
Fixes #43943
* Skip a flaky test
Related to #45234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Working Area-Compilers Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. New Language Feature - Pattern Matching Pattern Matching
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants