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
When attempting to compile two Leo programs, I encountered an issue. Here are the details:
The parent.leo program defines a TestStruct structure and includes one asynchronous transition function. This program compiles successfully on its own.
The child.leo program import parent.leo.
The expectation is that both programs compile successfully, but an error occurs during the compilation of child.leo.
Steps to Reproduce
Create the parent.leo file and add the following code:
Create the child.leo file and add the following code:
// The 'child' program.
import parent.aleo;
program child.aleo {
transition main() -> u32 {
return 1u32;
}
}
Attempt to compile both programs.
Code snippet to reproduce
Please see the code snippets provided above.
Stack trace & error message
The following error occurs during the compilation of child.leo:
Leo ✅ Compiled 'parent.aleo' into Aleo instructions
Error [ETYC0372017]: The type`TestStruct` is not found in the current scope.
--> parent/src/main.leo:1:1
|
1 | // The 'parent' program.
||
= If you are using an external type, make sure to preface with the program name. Ex: `credits.aleo/credits` instead of `credits`
Error [ETYC0372017]: The type`TestStruct` is not found in the current scope.
--> parent/src/main.leo:1:1
|
1 | // The 'parent' program.
||
= If you are using an external type, make sure to preface with the program name. Ex: `credits.aleo/credits` instead of `credits`
Expected Behavior
The programs should compile successfully.
Your Environment
Leo Version: testnet-beta branch (latest)
Rust Version: 1.78.0
Computer OS: MacOS
Additional Information
I suspect that the issue might be related to the use of struct in the finalize function within the parent.aleo program. This problem only arises when the child.aleo program tries to reference parent.aleo.
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
When attempting to compile two Leo programs, I encountered an issue. Here are the details:
parent.leo
program defines aTestStruct
structure and includes one asynchronous transition function. This program compiles successfully on its own.child.leo
program importparent.leo
.child.leo
.Steps to Reproduce
Create the
parent.leo
file and add the following code:Create the
child.leo
file and add the following code:Attempt to compile both programs.
Code snippet to reproduce
Please see the code snippets provided above.
Stack trace & error message
The following error occurs during the compilation of
child.leo
:Expected Behavior
The programs should compile successfully.
Your Environment
Additional Information
I suspect that the issue might be related to the use of
struct
in thefinalize
function within theparent.aleo
program. This problem only arises when thechild.aleo
program tries to referenceparent.aleo
.The text was updated successfully, but these errors were encountered: