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

Confusing error message with redundant generic names #141

Open
phorward opened this issue Jul 6, 2024 · 0 comments
Open

Confusing error message with redundant generic names #141

phorward opened this issue Jul 6, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@phorward
Copy link
Member

phorward commented Jul 6, 2024

This script

Assignment : @<Expression, Assignment: Assignment, ext: void> {
    Ident _ '=' _ Expect<Assignment>  ast("assign" + ext)
    Expression  ast("value")
}

ast_print(Assignment<Int>)

generates the error messages

'Assignment' requires assignment of generic argument 'Expression'
'Assignment' requires assignment of generic argument 'Expression'

When, according to the error message hint, the script is changed into this version:

Assignment : @<Expression, Assignment: Assignment, ext: void> {
    Ident _ '=' _ Expect<Assignment<Int>>  ast("assign" + ext)
    Expression  ast("value")
}

ast_print(Assignment<Int>)

the error messages gets more confusing:

Line 2, column 26: Use of undefined name 'Assignment<Int>'
@phorward phorward added the bug Something isn't working label Jul 6, 2024
@phorward phorward added this to the v0.7 milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant