allow multiple guards in the same pattern

This commit is contained in:
Folkert 2021-07-12 17:40:49 +02:00
parent a70810b455
commit 7d256067f9
2 changed files with 1 additions and 2 deletions

View file

@ -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 {