Skip to content

Commit

Permalink
update can_omit_element_sizes_array to not operate over slices
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Mar 11, 2024
1 parent 3f67605 commit c4e0fd7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2268,10 +2268,7 @@ impl Context {

// We can omit the element size array for arrays which don't contain arrays or slices.
fn can_omit_element_sizes_array(array_typ: &Type) -> bool {
if array_typ.contains_slice_element() {
return false;
}
let Type::Array(types, _) = array_typ else {
let (Type::Array(types, _) | Type::Slice(types)) = array_typ else {
panic!("ICE: expected array type");
};

Expand Down

0 comments on commit c4e0fd7

Please sign in to comment.