forgot to fix return

This commit is contained in:
Jakub Doka 2024-11-13 15:27:35 +01:00
parent f77bc52465
commit f493c2776f
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -4104,7 +4104,9 @@ impl<'a> Codegen<'a> {
self.report(pos, "function instance has too many arguments");
return None;
};
let prev_file = mem::replace(&mut self.ci.file, file);
let ret = self.ty(ret);
self.ci.file = prev_file;
self.ci.scope.vars.drain(base..).for_each(|v| v.remove(&mut self.ci.nodes));