From 5031befe3b2d51727f0f86d524993cf2f64233ce Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Fri, 24 Dec 2021 17:14:45 -0800 Subject: [PATCH] bugfix --- src/frontend.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend.rs b/src/frontend.rs index 669cb12..574eff9 100644 --- a/src/frontend.rs +++ b/src/frontend.rs @@ -1133,8 +1133,9 @@ impl<'a, 'b> FunctionBodyBuilder<'a, 'b> { if let Some(block) = self.cur_block { let values = values.to_vec(); self.body.end_block(block, Terminator::Return { values }); + self.cur_block = None; + self.locals.finish_block(); } - self.cur_block = None; } fn push_block_params(&mut self, num_params: usize) {