closure-compiler icon indicating copy to clipboard operation
closure-compiler copied to clipboard

suppress {es5Strict} does not work

Open eustas opened this issue 4 years ago • 4 comments

File example.js:

/** @suppress {es5Strict} */
function hello() {
  var a = "\306";
}

Command: java -jar closure-compiler.jar example.js

Output:

example.js:3:10: WARNING - [JSC_INVALID_OCTAL_LITERAL] This style of octal literal is not supported in strict mode.
  3|   var a = "\306";
               ^

0 error(s), 1 warning(s)
function hello(){};

Related bug: https://github.com/bazelbuild/rules_closure/issues/502

eustas avatar Mar 24 '21 12:03 eustas

Can you confirm the version of the compiler you are using?

concavelenz avatar Mar 24 '21 21:03 concavelenz

closure-compiler-v20210106.jar going to try a newer one (if any)

eustas avatar Mar 24 '21 21:03 eustas

closure-compiler-v20210302.jar has the same problem

eustas avatar Mar 24 '21 21:03 eustas

Ok, with strict mode input this is a parse error and thus not suppressible.

concavelenz avatar Mar 29 '21 21:03 concavelenz