This commit is contained in:
Folkert 2020-11-02 20:28:12 +01:00
parent eedf746ec7
commit 841d696e6d
3 changed files with 22 additions and 4 deletions

View file

@ -2031,9 +2031,6 @@ pub fn with_hole<'a>(
}
}
}
// Var(symbol) => panic!("reached Var {}", symbol),
// assigned,
// Stmt::Ret(symbol),
Tag {
variant_var,
name: tag_name,
@ -4110,7 +4107,13 @@ fn reuse_function_symbol<'a>(
original: Symbol,
) -> Stmt<'a> {
match procs.partial_procs.get(&original) {
None => result,
None => {
if original.module_id() != env.home && original.module_id() != ModuleId::ATTR {
result
} else {
result
}
}
Some(partial_proc) => {
let arg_var = arg_var.unwrap_or(partial_proc.annotation);
// this symbol is a function, that is used by-name (e.g. as an argument to another