mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
more imported function fixes
This commit is contained in:
parent
5e29ee1576
commit
6704208fc7
1 changed files with 7 additions and 3 deletions
|
@ -571,6 +571,12 @@ impl<'a> Procs<'a> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If this is an imported symbol, let its home module make this specialization
|
||||||
|
if env.is_imported_symbol(name) {
|
||||||
|
add_needed_external(self, env, fn_var, name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We're done with that tuple, so move layout back out to avoid cloning it.
|
// We're done with that tuple, so move layout back out to avoid cloning it.
|
||||||
let (name, layout) = tuple;
|
let (name, layout) = tuple;
|
||||||
|
|
||||||
|
@ -589,7 +595,7 @@ impl<'a> Procs<'a> {
|
||||||
// TODO should pending_procs hold a Rc<Proc>?
|
// TODO should pending_procs hold a Rc<Proc>?
|
||||||
let partial_proc = match self.partial_procs.get(&symbol) {
|
let partial_proc = match self.partial_procs.get(&symbol) {
|
||||||
Some(p) => p.clone(),
|
Some(p) => p.clone(),
|
||||||
None => panic!("no partial_proc for {:?}", symbol),
|
None => panic!("no partial_proc for {:?} in module {:?}", symbol, env.home),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mark this proc as in-progress, so if we're dealing with
|
// Mark this proc as in-progress, so if we're dealing with
|
||||||
|
@ -4831,8 +4837,6 @@ fn reuse_function_symbol<'a>(
|
||||||
.from_var(env.arena, arg_var, env.subs)
|
.from_var(env.arena, arg_var, env.subs)
|
||||||
.expect("creating layout does not fail");
|
.expect("creating layout does not fail");
|
||||||
|
|
||||||
add_needed_external(procs, env, arg_var, original);
|
|
||||||
|
|
||||||
procs.insert_passed_by_name(
|
procs.insert_passed_by_name(
|
||||||
env,
|
env,
|
||||||
arg_var,
|
arg_var,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue