feat(unify): we were actually hitting the second case but desc now comes from first

This commit is contained in:
rvcas 2021-03-22 00:50:03 -04:00
parent eff822f48f
commit b063b45481
2 changed files with 2 additions and 2 deletions

View file

@ -630,7 +630,7 @@ mod solve_expr {
} }
"# "#
), ),
"{ x: List (a, b -> [ Foo a b ]*), y: List (a, b -> [ Foo a b ]*), z: List (a, b -> [ Foo a b ]*) }", "{ x : List [ Foo ]*, y : List (a -> [ Foo a ]*), z : List (b, c -> [ Foo b c ]*) }",
) )
} }

View file

@ -1124,7 +1124,7 @@ fn unify_flat_type(
let problems = unify_pool(subs, pool, *ret, new_tag_union_var); let problems = unify_pool(subs, pool, *ret, new_tag_union_var);
if problems.is_empty() { if problems.is_empty() {
let desc = subs.get(ctx.second); let desc = subs.get(ctx.first);
subs.union(ctx.first, ctx.second, desc); subs.union(ctx.first, ctx.second, desc);
vec![] vec![]