Skip to content

Commit

Permalink
fix: Ssa typing of make_offset (#4277)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Partial work towards #4275

## Summary\*



## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
sirasistant authored Feb 6, 2024
1 parent d0b843f commit e4378ee
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 e4378ee

Please sign in to comment.