diff --git a/lang/src/son.rs b/lang/src/son.rs index aef7ce5..a55328d 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -3625,7 +3625,7 @@ impl<'a> Codegen<'a> { let mut ret = Some(Value::VOID); for stmt in stmts { - ret = ret.and(self.expr(stmt)); + ret = ret.and(self.expr_ctx(stmt, Ctx::default().with_ty(ty::Id::VOID))); if let Some(mut id) = ret { if id.ty != ty::Id::VOID { self.warn(