We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While starting to learn how to use Noir language and Nargo, i noticed there is an error the "Control Flow" section of Noir documentation :
https://noir-lang.org/language_concepts/control_flow
The first ''Loop'' section says : The index for loops is of type u64.
u64
After a few tests, i confirm the index of a loop is of type field.
field
The documentation should be modified to replace u64 by field .
This compiles well :
for i in 0..8 { for j in 0..8 { if (i as u32) + (j as u32) < 8) { ... } } }
whereas this will throw an error :
for i in 0..8 { for j in 0..8 { if (i + j < 8) { ... } } }
AssertionError: error: Comparisons are invalid on Field types. Try casting the operands to a sized integer type first
Noirup
nargo 0.15.0 , nargo 0.17.0, nargo 0.10.5
Yes
The text was updated successfully, but these errors were encountered:
@kevaundray should i propose a PR for this ? i'm willing to contribute to Noir ecosystem but i didn't get any answer for a month. Thank you!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Aim
While starting to learn how to use Noir language and Nargo, i noticed there is an error the "Control Flow" section of Noir documentation :
https://noir-lang.org/language_concepts/control_flow
The first ''Loop'' section says :
The index for loops is of type
u64
.After a few tests, i confirm the index of a loop is of type
field
.Expected Behavior
The documentation should be modified to replace
u64
byfield
.Bug
This compiles well :
whereas this will throw an error :
AssertionError: error: Comparisons are invalid on Field types. Try casting the operands to a sized integer type first
Installation Method
Noirup
Nargo Version
nargo 0.15.0 , nargo 0.17.0, nargo 0.10.5
Would you like to submit a PR for this Issue?
Yes
The text was updated successfully, but these errors were encountered: