typecheck return types

This commit is contained in:
2026-03-17 17:11:14 +01:00
parent 664a51c88d
commit 4154901339
7 changed files with 72 additions and 50 deletions

View File

@@ -339,7 +339,7 @@ _builtin_environ:
emit!(&mut self.output, " ret");
}
}
Stmt::Return(expr) => {
Stmt::Return { expr, keyword: _ } => {
self.compile_expr(env, expr)?;
emit!(&mut self.output, " mov rsp, rbp");
emit!(&mut self.output, " pop rbp");