mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Don't try to fix recursion vars if there are other errors
This commit is contained in:
parent
1e1ffb2f62
commit
939f413569
1 changed files with 10 additions and 6 deletions
|
@ -579,9 +579,11 @@ fn unify_structure(
|
|||
// unify the structure with this unrecursive tag union
|
||||
let mut problems = unify_pool(subs, pool, ctx.first, *structure, ctx.mode);
|
||||
|
||||
problems.extend(fix_tag_union_recursion_variable(
|
||||
subs, ctx, ctx.first, other,
|
||||
));
|
||||
if problems.is_empty() {
|
||||
problems.extend(fix_tag_union_recursion_variable(
|
||||
subs, ctx, ctx.first, other,
|
||||
));
|
||||
}
|
||||
|
||||
problems
|
||||
}
|
||||
|
@ -594,9 +596,11 @@ fn unify_structure(
|
|||
// unify the structure with this unrecursive tag union
|
||||
let mut problems = unify_pool(subs, pool, ctx.first, *structure, ctx.mode);
|
||||
|
||||
problems.extend(fix_tag_union_recursion_variable(
|
||||
subs, ctx, ctx.first, other,
|
||||
));
|
||||
if problems.is_empty() {
|
||||
problems.extend(fix_tag_union_recursion_variable(
|
||||
subs, ctx, ctx.first, other,
|
||||
));
|
||||
}
|
||||
|
||||
problems
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue