You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler throws an error when trying to multiply a field by a double negation of a field: 1field * (-(-1field)).
However, the compiler does not throw an error when directly assigning a double negation of a field to a variable.
Steps to Reproduce
Run the code snippet below in Leo with the command:
leo execute main
Code snippet to reproduce
programmain.aleo{transitionmain(){
let a: field=(-(-1field));// This line compiles successfully
let b: field=1field*(-(-1field));// This line throws a compilation error}}
Stack trace & error message
Leo ✅ Compiled 'main.leo' into Aleo instructions
Error [ECLI0377008]: Failed to execute the `build` command.
SnarkVM Error: Failed to parse string. Remaining invalid string is: "mul 1field --1field into r0;"
Expected Behavior
The code snippet should compile successfully.
Your Environment
Leo version: leo 1.9.3
Rust version: rustc 1.70.0 (90c541806 2023-05-31)
Computer OS: Ubuntu 22.04.2 LTS
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
The compiler throws an error when trying to multiply a field by a double negation of a field:
1field * (-(-1field))
.However, the compiler does not throw an error when directly assigning a double negation of a field to a variable.
Steps to Reproduce
Run the code snippet below in Leo with the command:
Code snippet to reproduce
Stack trace & error message
Expected Behavior
The code snippet should compile successfully.
Your Environment
Leo version: leo 1.9.3
Rust version: rustc 1.70.0 (90c541806 2023-05-31)
Computer OS: Ubuntu 22.04.2 LTS
The text was updated successfully, but these errors were encountered: