Chapter 5.1.2 of the recently approved ES3.1 spec, and the corresponding language from ES 262 say "A MultiLineComment? (that is, a comment of the form "/* ... */" regardless of whether it spans more than one line) is likewise simply discarded if it contains no line terminator, but if a MultiLineComment? contains one or more line terminators, then it is replaced with a single line terminator, which becomes part of the stream of inputs for the syntactic grammar." But the below returns 2 on Safari, when it should return 1. (function () { a: for (;;) { for (;;) { break/* */a; } return 1; } return 2; })() By way of explanation, the comment between break and a should introduce a newline, which since break is a restricted production, should cause it to break without a label (out of the inner loop), instead of breaking to the label a (the outer loop).
<rdar://problem/6538820>
This is still an issue (as of r55043) A simple example demonstrating WebKit non-conformance in regards to replacing LineTerminator-containing multiline comment with LineTerminator: (function(){ return/* */1 })(); Expected: `undefined` Actual: `1`
Still happens in rev 55516.
Oh wow. This one is still in r70429.
Fixed in r89100