quint icon indicating copy to clipboard operation
quint copied to clipboard

The parser and type checker allows declaring state variables and constants with operator types

Open shonfeder opened this issue 2 years ago • 1 comments

E.g., from the repl

>>> var opervar : (int) => str

>>> const operconst: (int) => str

I don't think we're meant to allow operators as 1st class values. If I'm not mistaken, this can be ruled out in the syntax. But would it be better to catch it during type checking in terms of user errors?

shonfeder avatar Dec 21 '22 03:12 shonfeder

Yes, this could be done by the type checker.

konnov avatar Dec 21 '22 08:12 konnov