From a6f4a3b5c46404957798bb7f18294b01889b12ca Mon Sep 17 00:00:00 2001 From: Jake Fecher Date: Wed, 10 May 2023 12:19:50 -0500 Subject: [PATCH] Fix inlining bug --- crates/noirc_evaluator/src/ssa_refactor/opt/inlining.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/noirc_evaluator/src/ssa_refactor/opt/inlining.rs b/crates/noirc_evaluator/src/ssa_refactor/opt/inlining.rs index 6e7c9848748..6848f84bb7b 100644 --- a/crates/noirc_evaluator/src/ssa_refactor/opt/inlining.rs +++ b/crates/noirc_evaluator/src/ssa_refactor/opt/inlining.rs @@ -305,7 +305,8 @@ impl<'function> PerFunctionContext<'function> { arguments: &[ValueId], ) { let old_results = self.source_function.dfg.instruction_results(call_id); - let new_results = self.context.inline_function(ssa, function, arguments); + let arguments = vecmap(arguments, |arg| self.translate_value(*arg)); + let new_results = self.context.inline_function(ssa, function, &arguments); Self::insert_new_instruction_results(&mut self.values, old_results, new_results); }