From 91bd47190402f0fe567dbfb6fcfa17b97c129905 Mon Sep 17 00:00:00 2001 From: jfecher Date: Tue, 28 Mar 2023 23:33:10 +0100 Subject: [PATCH] fix!: Fix returning of structs in ACIR (#1058) * Fix returning of structs in ACIR * fmt --- .../noirc_evaluator/src/ssa/acir_gen/operations/return.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/noirc_evaluator/src/ssa/acir_gen/operations/return.rs b/crates/noirc_evaluator/src/ssa/acir_gen/operations/return.rs index 4ebbbe0eef4..7b99b98c45e 100644 --- a/crates/noirc_evaluator/src/ssa/acir_gen/operations/return.rs +++ b/crates/noirc_evaluator/src/ssa/acir_gen/operations/return.rs @@ -53,7 +53,11 @@ pub(crate) fn evaluate( witnesses.push(witness); } evaluator.public_inputs.extend(witnesses.clone()); - evaluator.param_witnesses.insert(MAIN_RETURN_NAME.to_owned(), witnesses); + evaluator + .param_witnesses + .entry(MAIN_RETURN_NAME.to_owned()) + .or_default() + .append(&mut witnesses); } Ok(None)