mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +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)]
|
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);
|
checked_rows.push(next_row);
|
||||||
} else {
|
} else {
|
||||||
return Err(Error::Redundant {
|
return Err(Error::Redundant {
|
||||||
|
|
|
@ -502,7 +502,6 @@ fn when_on_single_value_tag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn if_guard_multiple() {
|
fn if_guard_multiple() {
|
||||||
assert_evals_to!(
|
assert_evals_to!(
|
||||||
indoc!(
|
indoc!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue