Skip to content

Misleading error message when using = in place of : #139

@inariksit

Description

@inariksit

Here's a typical error when creating some lincat:

lincat  VPS2 = X.VPS ** {c2 = Compl} ;

i.e. using, in error, c2 = Compl instead of the correct c2 : Compl.

The error message is this:

      record type expected for: v
       instead of the inferred: {s : Agr => Str; lock_VPS : {};
                                 sc : NPForm} ** {c2 = {s : Str; c : NPForm; isPre : Bool}}

All information is there, it is even showing the misplaced = in the message, but it's confusing because it says "record type expected" and then showing something that looks very much like a record, except for that one character. A better error message would point out the = sign and suggest a colon.

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