mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Make sure to apply "is-open" constraints at the very end of pattern constraining
Closes #3298
This commit is contained in:
parent
613606a67d
commit
13b0ce7ca0
5 changed files with 85 additions and 62 deletions
|
@ -7409,4 +7409,22 @@ mod solve_expr {
|
|||
"###
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn catchall_branch_for_pattern_not_last() {
|
||||
infer_queries!(
|
||||
indoc!(
|
||||
r#"
|
||||
\x -> when x is
|
||||
#^
|
||||
A B _ -> ""
|
||||
A _ C -> ""
|
||||
"#
|
||||
),
|
||||
@r#"""
|
||||
x : [A [B]* [C]*]
|
||||
"""#
|
||||
allow_errors: true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue