Fix some constraint gen

This commit is contained in:
Richard Feldman 2020-06-21 16:46:44 -04:00
parent 32b9b1ea60
commit 56c637e399
6 changed files with 93 additions and 70 deletions

View file

@ -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