-
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: Compiler emits invalid JS when throw
followed by if
or for
#3709
Labels
Comments
It also works if you add parentheses:
compiles to:
|
Probably related, from #3357: The following compiles to invalid JS: throw for v in list then v Basically we shouldn’t allow |
GeoffreyBooth
changed the title
Compiler emits invalid JS code when nesting IF inside THROW
Invalid JS: Compiler emits invalid JS code when nesting IF inside THROW
May 6, 2017
GeoffreyBooth
changed the title
Invalid JS: Compiler emits invalid JS code when nesting IF inside THROW
Invalid JS: Compiler emits invalid JS code when for May 6, 2017
throw
followed by if
or for
GeoffreyBooth
changed the title
Invalid JS: Compiler emits invalid JS code when for
Invalid JS: Compiler emits invalid JS when May 6, 2017
throw
followed by if
or for
throw
followed by if
or for
This was referenced May 6, 2017
GeoffreyBooth
added a commit
to GeoffreyBooth/coffeescript
that referenced
this issue
Aug 25, 2017
… the returned value of the statement/loop
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
This seemingly valid CS code:
Compiles to invalid JS:
I say seemingly valid because the same thing works for a function call:
The text was updated successfully, but these errors were encountered: