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
Per title, when defining an empty struct the program fails with a cryptic error message as such:
Error: Failed to parse string. Parsing Error: VerboseError { errors: [("struct MyEmptyStruct:\n\n\nfunction main:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n", Nom(Tag)), ("\n\nstruct MyEmptyStruct:\n\n\nfunction main:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n", Nom(Alt)), ("\n\nstruct MyEmptyStruct:\n\n\nfunction main:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n", Nom(Many1))] }
Below is the program generated from leo build that fails during snarkvm build.
If running directly with snarkvm buildsame error occurs.
program empty_struct_error_message.aleo;
struct MyEmptyStruct:
function main:
input r0 as u32.public;
input r1 as u32.private;
add r0 r1 into r2;
output r2 as u32.private;
If this was intended, the language server should pick it up and the docs should also have this information available.
Steps to Reproduce
Write a leo and aleo program with an empty struct defined.
🐛 Bug Report
Per title, when defining an empty struct the program fails with a cryptic error message as such:
Below is the program generated from
leo build
that fails duringsnarkvm build
.If running directly with
snarkvm build
same error occurs.If this was intended, the language server should pick it up and the docs should also have this information available.
Steps to Reproduce
A minimal reproduction is available here:
https://github.com/cwkang1998/aleo-bug-report-reproduction/tree/main/empty_struct_error_message
Expected Behavior
Either an appropriate error should be shown during compilation and language server, or this behavior should be allowed.
Your Environment
fa509f033aa747c5f924f7b776aabcfa07c431fd
The text was updated successfully, but these errors were encountered: