noir
noir copied to clipboard
Calling `map` on a slice panics
Aim
Allow calling map
on a slice
Expected Behavior
The file to compile successfully and return nothing
Bug
Compiler panics
To Reproduce
fn main() {
let x: [Field] = [3; 4];
let _ = x.map(|y| y);
}
returns:
The application panicked (crashed).
Message: Length of array is unknown when evaluating numeric generic
Location: compiler/noirc_frontend/src/monomorphization/mod.rs:461
Installation Method
Compiled from source
Nargo Version
nargo version = 0.23.0 noirc version = 0.23.0+5a9e434c51549d889e2538111393cc89030bb39c (git version hash: 3af2a89826f7d9b6dcd1782b8b38417c64065293, is dirty: true)
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response
Is this issue related (https://github.com/noir-lang/noir/issues/2540)? @michaeljklein Could you check if it is resolved by your work?
@vezenovm yes that issue has the same underlying cause as this one
This will no longer panic once https://github.com/noir-lang/noir/pull/4408 is merged but is still active.