Reason: Better syntax error for `return foo`

Created on 5 Mar 2018  ·  5Comments  ·  Source: reasonml/reason

Something like "return doesn't exist in Reason; blabla"

Error messages

Most helpful comment

Folks, please read the title. It's to provide better syntax error message when people attempt to do return foo, which is invalid in reason. Right now the error message is <UNKNOWN SYNTAX ERROR>

All 5 comments

What if someone names a function return, as with monads (although that's a terrible name, it's still used)

We could make it a hint, like we’ve done in the past. The hints are 100% accurate but they help give some idea of what caused the problem. Like “did you miss a semicolon” etc

return foo is invalid syntax, not a function

Reason does not need something like this :/

Folks, please read the title. It's to provide better syntax error message when people attempt to do return foo, which is invalid in reason. Right now the error message is <UNKNOWN SYNTAX ERROR>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rickyvetter picture rickyvetter  ·  3Comments

ostera picture ostera  ·  3Comments

TrakBit picture TrakBit  ·  3Comments

gustavopinto picture gustavopinto  ·  3Comments

bobzhang picture bobzhang  ·  3Comments