passing down the inference of 'void' to statements

This commit is contained in:
Jakub Doka 2024-11-23 15:33:28 +01:00
parent cad0a828d0
commit f353bd5882
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -3625,7 +3625,7 @@ impl<'a> Codegen<'a> {
let mut ret = Some(Value::VOID); let mut ret = Some(Value::VOID);
for stmt in stmts { 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 let Some(mut id) = ret {
if id.ty != ty::Id::VOID { if id.ty != ty::Id::VOID {
self.warn( self.warn(