🐛 Bug Report
Hexadecimal input values (e.g., 0xfffield) are rejected by Leo, while Circom, Noir, and Cairo all accept them and correctly interpret them as their decimal equivalent (255).
Steps to Reproduce
Code snippet to reproduce
program mutadiff_test.aleo {
transition main(public a: field) -> field {
return a + 1field;
}
}
# Decimal — works
leo run main 255field
# Output: 256field ✓
# Hex — rejected!
leo run main 0xfffield
# Error
Stack trace & error message
Leo rejects the hex input with a parsing error.
Expected Behavior
Accept 0xff as decimal 255, consistent with Circom, Noir, and Cairo.
Cross-compiler comparison:
| Input |
Circom |
Noir |
Cairo |
Leo |
| 0xff |
Accepts (255) |
Accepts (255) |
Accepts (255) |
❌ Rejects |
| 0xFF |
Accepts (255) |
Accepts (255) |
Accepts (255) |
❌ Rejects |
Leo is the only compiler among the 4 tested that rejects hexadecimal inputs.
Your Environment
- Leo Version: 3.5.0
- Rust Version: 1.93.0
- Computer OS: Ubuntu
🐛 Bug Report
Hexadecimal input values (e.g.,
0xfffield) are rejected by Leo, while Circom, Noir, and Cairo all accept them and correctly interpret them as their decimal equivalent (255).Steps to Reproduce
Code snippet to reproduce
Stack trace & error message
Leo rejects the hex input with a parsing error.
Expected Behavior
Accept
0xffas decimal 255, consistent with Circom, Noir, and Cairo.Cross-compiler comparison:
Leo is the only compiler among the 4 tested that rejects hexadecimal inputs.
Your Environment