-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid JS: Nested throw expressions #3789
Labels
Comments
I don't think it should compile. That should be a syntax error. |
GeoffreyBooth
changed the title
CoffeeScript generates invalid syntax for nested throw expressions.
Invalid JS: Nested throw expressions
May 6, 2017
See also #3709. |
GeoffreyBooth
added a commit
to GeoffreyBooth/coffeescript
that referenced
this issue
Aug 25, 2017
GeoffreyBooth
added a commit
that referenced
this issue
Aug 25, 2017
Fixed by #4664. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following CoffeeScript code:
compiles to the following JavaScript code:
which is invalid syntax in JavaScript.
Instead it should either compile to the following JavaScript code:
or be rejected by the CoffeeScript compiler.
Now this code is of course incredibly silly, but the CoffeeScript compiler should under no circumstance both accept the input and generate code with invalid syntax.
The text was updated successfully, but these errors were encountered: