Skip to content

Commit

Permalink
fix: ssa typing in make_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
sirasistant committed Feb 6, 2024
1 parent d0b843f commit 972dc6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa/ssa_gen/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 972dc6b

Please sign in to comment.