mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
allow multiple guards in the same pattern
This commit is contained in:
parent
a70810b455
commit
7d256067f9
2 changed files with 1 additions and 2 deletions
|
@ -353,7 +353,7 @@ fn to_nonredundant_rows(
|
|||
vec![simplify(&loc_pat.value)]
|
||||
};
|
||||
|
||||
if is_useful(checked_rows.clone(), next_row.clone()) {
|
||||
if any_has_guard || is_useful(checked_rows.clone(), next_row.clone()) {
|
||||
checked_rows.push(next_row);
|
||||
} else {
|
||||
return Err(Error::Redundant {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue