Skip to content

Commit

Permalink
Update compiler/noirc_evaluator/src/ssa/opt/constant_folding.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Feb 3, 2025
1 parent 303e396 commit 7eb871f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/noirc_evaluator/src/ssa/opt/constant_folding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ impl<'brillig> Context<'brillig> {
// Should we consider calls to slice_push_back and similar to be mutating operations as well?
if let Store { value: array, .. } | ArraySet { array, .. } = instruction {
if function.dfg.is_global(*array) {
// Early return as we expect globals to be immutable.
return;
};

Expand Down

0 comments on commit 7eb871f

Please sign in to comment.