Merge pull request #5188 from roc-lang/i5177

Make sure openness constraint goes under tuples
This commit is contained in:
Ayaz 2023-03-25 15:52:09 -05:00 committed by GitHub
commit 1891df77b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -1845,6 +1845,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));