-
Notifications
You must be signed in to change notification settings - Fork 229
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
Single digit hex literals result in an InvalidIntegerLiteral error #3235
Comments
This error also looks like it was never meant to be shown - we should not display the actual error kind InvalidIntegerLiteral to the user. |
It looks like this error happens not only with single digit hex literals, but with an odd amount of symbols in hex literals. As I understood that the problem lies in this code fragment (probably, hex::decode() couldn't parse such values): |
@jfecher i took a stab at this over coffee this morning^ thanks for the pointer on code loc here @VictoriaGrasshopper 🙏 👑 |
# Description single digit (or generally, odd length) hex literals such as `0x4` result in an `InvalidIntegerLiteral` error ## Problem\* Resolves #3235 ## Summary\* i just prefixed all odd-length hex literals with another `0`, happy to change course if there's a better/more efficient way here (i'm kinda rust noob) ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
Aim
Writing
0x4
in a programExpected Behavior
The integer
4
Bug
To Reproduce
Installation Method
None
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: