mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
fix triple (or more) mutualy recursive type aliases
This commit is contained in:
parent
5483ec819f
commit
c589be43c6
3 changed files with 47 additions and 9 deletions
|
@ -573,11 +573,11 @@ fn unify_shared_tags(
|
|||
// with uniqueness inference). Thus we must expand the recursive tag union to
|
||||
// unify if with the non-recursive one. Thus:
|
||||
|
||||
// replace the rvar with ctx.second in expected
|
||||
// replace the rvar with ctx.second (the whole recursive tag union) in expected
|
||||
subs.explicit_substitute(rvar, ctx.second, expected);
|
||||
|
||||
// but, by the `is_structure` condition above, only if we're unifying with a structure!
|
||||
// when `actual` is just a flex/rigid variable, the substitution will expand a
|
||||
// when `actual` is just a flex/rigid variable, the substitution would expand a
|
||||
// recursive tag union infinitely!
|
||||
|
||||
unify_pool(subs, pool, actual, expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue