From f493c2776f906b92e9c7e80943fe7b302086df10 Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Wed, 13 Nov 2024 15:27:35 +0100 Subject: [PATCH] forgot to fix return --- lang/src/son.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/src/son.rs b/lang/src/son.rs index 1cc2346..a4131d4 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -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));