mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
hook up TypeError
This commit is contained in:
parent
6531845966
commit
14ad793bd7
18 changed files with 216 additions and 63 deletions
|
@ -1287,7 +1287,7 @@ fn specialize_proc_body<'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!(unified.mismatches.is_empty());
|
||||
debug_assert!(matches!(unified, roc_unify::unify::Unified::Success(_)));
|
||||
let specialized_body = from_can(env, body, procs, None);
|
||||
// reset subs, so we don't get type errors when specializing for a different signature
|
||||
env.subs.rollback_to(snapshot);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue