There is an exception for opening curly braces in there, see the last list in that section:
A single new line token is accepted
- in front of an opening brace ‘{’, if that brace is a legal continuation of the current statement or expression,
That is the reason the comments break compilation, probably, as an empty line betweeen the opening brace and the line before should work (see second example in the spec).