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
Leo 1.0.7 produces an error if the name of a valid project contains an underscore. The compilation of such a project fails with the error “circuit Foo must be declared before it is used in an expression ” (see the static_false project in the screenshot). Exactly the same valid project, but with the name without the underscore (see the statictrue project in the screenshot) compiles without errors.
Steps to Reproduce
Code snippet to reproduce
// project static_false
circuit Foo {
a: u32
}
function main(a: u32, b: u32) {
let f = Foo{a: 0u32 };
}
Stack trace & error message
Waiting for 0 seconds, press CTRL+C to quit ...
Compiling Starting...
Compiling Compiling main program... ("c:\\Users\\test\\Aleo Studio\\static_false\\src/main.leo")
Compiling --> "c:\\Users\\test\\Aleo Studio\\static_false\\src/main.leo": 6:13
|
6 | let f = Foo{a: 0u32 };
| ^^^^^^^^^^^^^
|
= circuit `Foo` must be declared before it is used in an expression
Error: Crate("leo-compiler", "Program failed due to previous error")
Expected Behavior
There should be no error
Your Environment
Leo 1.0.7
rust 1.48.0
Edition: Windows 10 Pro
Version: 20H2
OS build: 19042.685
Experience: Windows Feature Experience Pack 120.2212.551.0
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
Leo 1.0.7 produces an error if the name of a valid project contains an underscore. The compilation of such a project fails with the error “circuit
Foo
must be declared before it is used in an expression ” (see the static_false project in the screenshot). Exactly the same valid project, but with the name without the underscore (see the statictrue project in the screenshot) compiles without errors.Steps to Reproduce
Code snippet to reproduce
Stack trace & error message
Expected Behavior
There should be no error
Your Environment
Edition: Windows 10 Pro
Version: 20H2
OS build: 19042.685
Experience: Windows Feature Experience Pack 120.2212.551.0
The text was updated successfully, but these errors were encountered: