Skip to content

Improve function argument sort error messages #37

@mmatsa

Description

@mmatsa

Here is a current error message:

Infer rule My-Rule-Name
Error: undefined enumeration value MY_CONSTRUCTOR in type MY_SORT
problem occurred while running the Tosca system

Lionel asked for an issue with a recommendation for the error message.
I'm not sure, but perhaps the error could look more like this:

Infer rule My-Rule-Name
Error: In rule My-Rule-Name at File.tsc line 210 there is a call to rule Other-Rule-Name where argument #1 expects type MY_SORT but instead is passed an argument MY_CONSTRUCTOR.
problem occurred while running the Tosca system

I don't love that verbiage, but it includes more standard compiler error message components such as:

  • Function in which the error occurs
  • File name and line number where the error occurs
  • Name of the rule being called that is causing the problem
  • Which argument there is the problem
  • What is the expected type and what is instead being found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions