-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was found in Inko (see inko-lang/inko#679). The flatten_or() method was applied after pushing bindings out of the rows. The result was that OR patterns containing bindings would be left as-is, triggering unreachable panics elsewhere in the implementation. This commit fixes it by using a different implementation: we process and expand all rows containing OR patterns _before_ pushing bindings out of patterns. Because this is potentially a bit more expensive to perform, the implementation skips this work if there aren't any OR patterns present.
- Loading branch information
1 parent
08a9fac
commit 50fcd0e
Showing
2 changed files
with
95 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters