Minor parser enhancement request: Not recognizing empty tuple / mistyped unit literal #7182
Labels
enhancement
New feature or request
intermediate issue
Likely good for someone who has completed a few other issues
When using empty parens as a unit literal
()
(as in Rust) instead of the correct{}
, the parser rightly gives an error, but does not explain why it is wrong.I believe including a hint or explanation would be beneficial, like the existing
Note, Roc doesn't use '()' as a null type.
when using()
in a type declaration.Perhaps something like:
Roc doesn't use parentheses for function calls
Did you mean to use {} instead?
Did you forget to include an expression in the parentheses?
The text was updated successfully, but these errors were encountered: