From 59f418f5d095a97c5bac19a2bac9ff4ae9e050bc Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu Date: Wed, 12 Apr 2023 12:11:10 -0700 Subject: [PATCH] Fix issue in codegen --- compiler/passes/src/code_generation/visit_statements.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/passes/src/code_generation/visit_statements.rs b/compiler/passes/src/code_generation/visit_statements.rs index 39e49a9a45..0aa0a0ef4c 100644 --- a/compiler/passes/src/code_generation/visit_statements.rs +++ b/compiler/passes/src/code_generation/visit_statements.rs @@ -167,13 +167,7 @@ impl<'a> CodeGenerator<'a> { } fn visit_expression_statement(&mut self, input: &'a ExpressionStatement) -> String { - match input.expression { - Expression::Call(_) => { - // Note that codegen for CallExpression in an expression statement does not return any destination registers. - self.visit_expression(&input.expression).1 - } - _ => unreachable!("ExpressionStatement's can only contain CallExpression's."), - } + self.visit_expression(&input.expression).1 } fn visit_increment(&mut self, input: &'a IncrementStatement) -> String {