Unhelpful error message (Error: unexpected token: "("
) when defining method that starts with a capital letter.
#15316
Labels
kind:bug
A bug in the code. Does not apply to documentation, specs, etc.
Bug Report
The following code fails to compile:
with the following error:
I believe the starting with the capital letter is the issue, because renaming the method to
foo
orfFoo
or_Foo
fixed it (successfully printing the output ofqux quux
), but the error message does not make that clear.I was additionally unable to find any documentation detailing that method names couldn't start with capital letters, so assuming I am not incorrect about the cause of the error it may help to update the relevant documentation to take note of that in addition to updating the error message.
Tested on:
The text was updated successfully, but these errors were encountered: