Closed jplevene closed 7 months ago
Even does this in WHITESPACE_ONLY that is not supposed to alter the code
This is caused by transpilation. See https://github.com/google/closure-compiler/issues/3856 and https://github.com/google/closure-compiler/issues/2007.
Compiler versions past https://github.com/google/closure-compiler/commit/ac3e3303617e23aed24eb7574e1d140565aa079a will default to not transpiling. If you're using an older version you can set --language_out=ECMASCRIPT_NEXT
. If you're using a newer version, are you setting --language_out
explicitly? You'd need to remove that.
I spotted this bug in the Google online compiler https://closure-compiler.appspot.com/ which is managed by Google so I reported this, and thanks. By default, clicking "Whitespace only" in the online compiler should include the line // @language_out ECMASCRIPT_NEXT which is causing the issue. Again, thanks for this and I have reported the bug there
A
for(const row of rows)
returns $jscomp and loads of junk JavaScript code that won't run.