Make sure "is open" constraints add flex vars at the right rank

This commit is contained in:
Ayaz Hafiz 2022-04-18 12:56:22 -04:00
parent 2856a38236
commit ceea194db4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -1187,6 +1187,7 @@ fn solve(
match new_desc.content {
Content::Structure(FlatType::TagUnion(tags, _)) => {
let new_ext = subs.fresh_unnamed_flex_var();
subs.set_rank(new_ext, new_desc.rank);
let new_union = Content::Structure(FlatType::TagUnion(tags, new_ext));
new_desc.content = new_union;
subs.set(actual, new_desc);