forked from AbleOS/holey-bytes
passing down the inference of 'void' to statements
This commit is contained in:
parent
cad0a828d0
commit
f353bd5882
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue