gf-core icon indicating copy to clipboard operation
gf-core copied to clipboard

Misleading error message when using `=` in place of `:`

Open inariksit opened this issue 3 years ago • 0 comments

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.

inariksit avatar Apr 12 '22 02:04 inariksit