Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up"do{;}while(false)false" prohibited in spec but allowed in consensus reality #684
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bterlson
Sep 7, 2016
Member
FWIW it also parses in Chakra and JSC. But isn't this just ASI semantics? ASI calls out this case specifically in bullet 1.3 (https://tc39.github.io/ecma262/#sec-rules-of-automatic-semicolon-insertion).
|
FWIW it also parses in Chakra and JSC. But isn't this just ASI semantics? ASI calls out this case specifically in bullet 1.3 (https://tc39.github.io/ecma262/#sec-rules-of-automatic-semicolon-insertion). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Oh, my mistake, it's right there. |
littledan
closed this
Sep 7, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
erights
Sep 7, 2016
Yup. I just checked https://es5.github.io/#x7.9.1 and this third bullet is new; presumably to close exactly this bug.
erights
commented
Sep 7, 2016
|
Yup. I just checked https://es5.github.io/#x7.9.1 and this third bullet is new; presumably to close exactly this bug. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Also see Annex E entry for 11.9.1. |
littledan commentedSep 7, 2016
This bug is following up on an earlier bug in the old tracker. I just checked, and the syntax is still allowed in Chrome and Firefox. Any thoughts on whether this should be standardized? I don't have any data on how often it's used, but it seems useful for minimizers. in V8, the syntax has been allowed since inception, with the following comment in the code from 2008:
I think the grammar change would be as simple as leaving off the semicolon at the end of IterationStatement. Thoughts? cc @erights who filed the original bug.