apalache icon indicating copy to clipboard operation
apalache copied to clipboard

[BUG] Incomprehensible parse error in type annotations

Open konnov opened this issue 3 years ago • 1 comments

I've forgotten that we have to use the tuple syntax:

\* @type: () => (Bool, Bool);
View1 ==
  <<x < 0, x > 0>>

The type parser spitted out something incomprehensible:

scala.MatchError: (List(Bool, Bool)~None) (of class scala.util.parsing.combinator.Parsers$$tilde)
	at at.forsyte.apalache.io.typecheck.parser.DefaultType1Parser$.$anonfun$typeExpr$5(DefaultType1Parser.scala:68)

konnov avatar May 18 '21 07:05 konnov

I just ran this today, and the error message reads:

Parsing error in the type annotation: () => (Bool, Bool)
Typing input error: Parser error in type annotation of View1: '->' expected but ) found

@konnov do you still consider this incomprehensible? It doesn't outright say that you should use <<...>> in the type, but it's also not a scala exception.

Kukovec avatar Mar 14 '23 14:03 Kukovec