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

Where clauses go on switch patterns, not cases #69

Merged
merged 1 commit into from
Nov 28, 2021

Conversation

alex-pinkus
Copy link
Owner

The grammar erroneously had it that a switch case would get a single
where clause, disallowing something like:

case .foo(x) where x.count() == 0, .bar(x):

Allowing where-clauses per pattern is strictly more flexible.

The grammar erroneously had it that a switch _case_ would get a single
`where` clause, disallowing something like:

```
case .foo(x) where x.count() == 0, .bar(x):
```

Allowing `where`-clauses per pattern is strictly more flexible.
@alex-pinkus
Copy link
Owner Author

One top-repo iteration failed on "Use Node.js", which is unusual. Gonna force-push to trigger a rerun. If this keeps happening, I'll probably have to look into building a parser as an artifact so that not all of the iterations build their own.

@alex-pinkus alex-pinkus merged commit 282ca53 into main Nov 28, 2021
@alex-pinkus alex-pinkus deleted the switch-where-clause branch November 28, 2021 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant