mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
Choose merged closure var based on whether it's recursive or not
This commit is contained in:
parent
3f1e11f920
commit
86c6d339c3
1 changed files with 3 additions and 1 deletions
|
@ -2518,10 +2518,12 @@ fn unify_flat_type<M: MetaCollector>(
|
|||
outcome.union(arg_outcome);
|
||||
|
||||
if outcome.mismatches.is_empty() {
|
||||
let merged_closure_var = choose_merged_var(env.subs, *l_closure, *r_closure);
|
||||
|
||||
outcome.union(merge(
|
||||
env,
|
||||
ctx,
|
||||
Structure(Func(*r_args, *r_closure, *r_ret)),
|
||||
Structure(Func(*r_args, merged_closure_var, *r_ret)),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue