Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small error formatting improvements #28326

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

ungaro
Copy link
Contributor

@ungaro ungaro commented Aug 16, 2024

Motivation

Consider this program:

// The 'leo_errors' program.
program leo_errors.aleo {

    struct VoteAggregate {
        proposal_id: field;
        proposal_some: field;
    }

    struct SomeStruct {
        proposal_id: boolean;
    }

    transition main() -> field {
        let st:VoteAggregate = VoteAggregate{
            proposal_id: 0field,
            proposal_some: 0field,
        };

        let ss:SomeStruct = SomeStruct{
            proposal_id: true,
            
        };

        return st.proposal_something;
        
    }
}

The output of this program is:

errors_typos

After this PR :

errors_corrected

Test Plan

Run the program above.

@ungaro
Copy link
Contributor Author

ungaro commented Aug 16, 2024

some small improvements to error outputs.
fyi @d0cd

@ungaro
Copy link
Contributor Author

ungaro commented Aug 17, 2024

I'm looking into why the tests are failing. These changes prevent some programs from building. The tests fail after compilation.

@ungaro
Copy link
Contributor Author

ungaro commented Aug 18, 2024

rolled back boolean to bool change, as the error comes from snarkVM; this PR only changes
Variable {} is not a member of struct struct {}
to
Variable {} is not a member of struct {}

a very small change @d0cd

Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@d0cd d0cd merged commit b218a22 into ProvableHQ:mainnet Aug 23, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants