GrammaticalFramework/gf-core

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

inariksit opened this issue · 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.