mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
parent
41d7ade5a3
commit
1b2ee9ad30
2 changed files with 18 additions and 0 deletions
|
@ -1847,6 +1847,11 @@ fn open_tag_union(subs: &mut Subs, var: Variable) {
|
|||
stack.extend(subs.get_subs_slice(fields.variables()));
|
||||
}
|
||||
|
||||
Structure(Tuple(elems, _)) => {
|
||||
// Open up all nested tag unions.
|
||||
stack.extend(subs.get_subs_slice(elems.variables()));
|
||||
}
|
||||
|
||||
Structure(Apply(Symbol::LIST_LIST, args)) => {
|
||||
// Open up nested tag unions.
|
||||
stack.extend(subs.get_subs_slice(args));
|
||||
|
|
|
@ -13170,4 +13170,17 @@ I recommend using camelCase. It's the standard style in Roc code!
|
|||
I would have to crash if I saw one of those! Add branches for them!
|
||||
"###
|
||||
);
|
||||
|
||||
test_no_problem!(
|
||||
openness_constraint_opens_under_tuple,
|
||||
indoc!(
|
||||
r#"
|
||||
x : [A, B, C]
|
||||
when (x, 1u8) is
|
||||
(A, _) -> Bool.true
|
||||
(B, _) -> Bool.true
|
||||
_ -> Bool.true
|
||||
"#
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue