This commit is contained in:
Folkert 2022-03-20 21:42:04 +01:00
parent 832681269e
commit 7062a71216
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 4 additions and 4 deletions

View file

@ -389,13 +389,13 @@ fn unify_structure(
match (ctx.mode.is_present(), flat_type) {
(true, FlatType::TagUnion(tags, _ext)) => {
let new_ext = subs.fresh_unnamed_flex_var();
let mut new_desc = ctx.first_desc.clone();
let mut new_desc = ctx.first_desc;
new_desc.content = Structure(FlatType::TagUnion(*tags, new_ext));
subs.set(ctx.first, new_desc);
}
(true, FlatType::FunctionOrTagUnion(tn, sym, _ext)) => {
let new_ext = subs.fresh_unnamed_flex_var();
let mut new_desc = ctx.first_desc.clone();
let mut new_desc = ctx.first_desc;
new_desc.content = Structure(FlatType::FunctionOrTagUnion(*tn, *sym, new_ext));
subs.set(ctx.first, new_desc);
}
@ -847,7 +847,7 @@ fn unify_tag_union_new(
// the top level extension variable for that!
let new_ext = fresh(subs, pool, ctx, Content::FlexVar(None));
let new_union = Structure(FlatType::TagUnion(tags1, new_ext));
let mut new_desc = ctx.first_desc.clone();
let mut new_desc = ctx.first_desc;
new_desc.content = new_union;
subs.set(ctx.first, new_desc);