Skip to content

Confusing error message with redundant generic names #141

Description

@phorward

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>'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions