mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Permit binding variables multiple itmes in when branches
This commit is contained in:
parent
c48c4f3183
commit
bf8fc0d0de
6 changed files with 78 additions and 31 deletions
|
@ -7357,4 +7357,18 @@ mod solve_expr {
|
|||
"List (A U8)",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shared_pattern_variable_in_when_branches() {
|
||||
infer_eq_without_problem(
|
||||
indoc!(
|
||||
r#"
|
||||
when A "" is
|
||||
A x | B x -> x
|
||||
C y | D y -> y
|
||||
"#
|
||||
),
|
||||
"",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue