Support bound variables in multiple patterns

This commit is contained in:
Ayaz Hafiz 2022-07-21 11:40:09 -04:00
parent bf8fc0d0de
commit ce8b50caea
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 59 additions and 4 deletions

View file

@ -7360,15 +7360,21 @@ mod solve_expr {
#[test]
fn shared_pattern_variable_in_when_branches() {
infer_eq_without_problem(
infer_queries!(
indoc!(
r#"
when A "" is
# ^^^^
A x | B x -> x
C y | D y -> y
# ^ ^ ^
"#
),
"",
@r###"
A "" : [A Str, B Str]
x : Str
x : Str
x : Str
"###
);
}
}