mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Fix some constraint gen
This commit is contained in:
parent
32b9b1ea60
commit
56c637e399
6 changed files with 93 additions and 70 deletions
|
@ -1478,11 +1478,9 @@ fn specialize<'a>(
|
|||
|
||||
// unify the called function with the specialized signature, then specialize the function body
|
||||
let snapshot = env.subs.snapshot();
|
||||
let unified = roc_unify::unify::unify(env.subs, annotation, fn_var);
|
||||
|
||||
debug_assert!(matches!(
|
||||
roc_unify::unify::unify(env.subs, annotation, fn_var),
|
||||
roc_unify::unify::Unified::Success(_)
|
||||
));
|
||||
debug_assert!(matches!(unified, roc_unify::unify::Unified::Success(_)));
|
||||
|
||||
let specialized_body = from_can(env, body, procs, layout_cache);
|
||||
// reset subs, so we don't get type errors when specializing for a different signature
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue