-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Design ReviewImplemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposalProposal champion
Milestone
Description
- Proposal added
- Discussed in LDM
- Decision in LDM
- Finalized (done, rejected, inactive)
- Spec'ed
The idea is to add three new pattern forms
- pattern
andpattern - pattern
orpattern notpattern
The latter two would not be permitted to define pattern variables in the subpatterns (as they would never be definitely assigned).
We'd have to decide on syntax and precedence, and whether some mechanism such as parentheses could be used for grouping patterns to override precedence.
Examples:
switch (o)
{
case 1 or 2:
case Point(0, 0) or null:
case Point(var x, var y) and var p:
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Design ReviewImplemented Needs ECMA SpecThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationThis feature has been implemented in C#, but still needs to be merged into the ECMA specificationProposalProposal champion