This commit is contained in:
Chris Fallin 2021-12-24 17:14:45 -08:00
parent 5ac961607f
commit 5031befe3b

View file

@ -1133,8 +1133,9 @@ impl<'a, 'b> FunctionBodyBuilder<'a, 'b> {
if let Some(block) = self.cur_block { if let Some(block) = self.cur_block {
let values = values.to_vec(); let values = values.to_vec();
self.body.end_block(block, Terminator::Return { values }); 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) { fn push_block_params(&mut self, num_params: usize) {