-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot iterate on slices #2336
Comments
This looks to be caused by us restricting optimizations for Brillig.
Passes and does not issue the compile-time error. This snippet produces this expected SSA:
While with the snippet posted in the main issue we get:
|
@vezenovm I think it is related but I don't think that is the actual reason the code is failing. Since the only unconstrained function here is println which does not contain any calls to main or sum_array internally, I'd still expect main to fully inline sum_array and unroll it successfully. It seems right now it does inline but does not unroll successfully for some reason. |
Ok, the error here is because the version with |
Aim
This code used to work, but now throws a
Could not determine loop bound at compile-time
errorAn alternative is to use generics
This seems to work for the above case but throw a
Non-numeric type variable used in expression expecting a value
panic when I use them in my actual library (https://github.com/shuklaayush/noir-bigint/blob/89b8a964cf94a0c5ff897795da30e255b82b355e/crates/biguint/src/lib.nr#L52-L66)Expected Behavior
Two scenarios:
Bug
To Reproduce
nargo execute main
Installation Method
Compiled from source
Nargo Version
nargo 0.10.1 (git version hash: fd29197, is dirty: false)
Additional Context
No response
Would you like to submit a PR for this Issue?
Maybe
Support Needs
No response
The text was updated successfully, but these errors were encountered: