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 pattern matching for enums #52

Open
leus opened this issue May 14, 2024 · 0 comments
Open

Support logical pattern matching for enums #52

leus opened this issue May 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@leus
Copy link

leus commented May 14, 2024

Using or in enum matches currently displays error EM0001 in the IDE:

sortOrder switch {
    SomeEnum.Unknown or
    SomeEnum.NewestFirst => someValue,
    SomeEnum.OldestFirst => anotherValue,
    => throw ExhaustiveMatch.Failed(sortOrder)
}
@WalkerCodeRanger WalkerCodeRanger added the enhancement New feature or request label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants