Fix eval_global_as_array_length
to support non-array-length types
#6238
Labels
bug
Something isn't working
Aim
#6137 adds the warning
EvaluatedGlobalIsntU32
wheneval_global_as_array_length
is used on non-u32
types.This is connected to the following (
test
: issue) pairs:numeric_generic_field_larger_than_u32
: Using largeField
's in numeric generics fails with "array length too large" #6125numeric_generic_field_arithmetic_larger_than_u32
:Field
computed to be larger thanu32::MAX
with arithmetic generics panics #6126Expected Behavior
eval_global_as_array_length
to either handle larger types, e.g.Field
properly, or to only be used when the globals are within the expected rangeTODO:
u32
kind computations, e.g. the equivalent ofU32_MAX + 1 - X
whereX > 0
Bug
numeric_generic_field_larger_than_u32
: Using largeField
's in numeric generics fails with "array length too large" #6125numeric_generic_field_arithmetic_larger_than_u32
:Field
computed to be larger thanu32::MAX
with arithmetic generics panics #6126To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: