From 972dc6b97749daada1782dc87193dad17ff670e8 Mon Sep 17 00:00:00 2001 From: sirasistant Date: Tue, 6 Feb 2024 16:53:21 +0000 Subject: [PATCH] fix: ssa typing in make_offset --- compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs b/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs index 0ca0f40d47f..4dc355ae51f 100644 --- a/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs +++ b/compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs @@ -740,7 +740,7 @@ impl<'a> FunctionContext<'a> { /// Create a const offset of an address for an array load or store pub(super) fn make_offset(&mut self, mut address: ValueId, offset: u128) -> ValueId { if offset != 0 { - let offset = self.builder.field_constant(offset); + let offset = self.builder.numeric_constant(offset, self.builder.type_of_value(address)); address = self.builder.insert_binary(address, BinaryOp::Add, offset); } address