When I am trying to compile a single file that contains a call to arguments.callee.name I get an error "arguments.callee" cannot be used in strict mode while passing. When I pass the argument --jscomp_off=es5Strict I see no difference.
Is don't think this is by design, right?
My command;
java -jar "res\closure-compiler-v20180610.jar" --compilation_level SIMPLE --js "C:\test.js" --js_output_file "C:\test.min.js" --define='IS_DEBUG=false' --jscomp_off=es5Strict --jscomp_off=unknownDefines
You need to pass in
--strict_mode_input=false
Otherwise the compiler overrides --jscomp_off=es5Strict here.
AFAIK this is intentional, but missing documentation. Probably need to update https://github.com/google/closure-compiler/wiki/Warnings.
I think it might be even clearer to throw an error for --jscomp_off=es5Strict instead of silently setting the error level. I'll update the documentation for now, and try to land a change that
es5Strict from the wildcard warnings (so --jscomp_off=* won't affect es5Strict)--jscomp_off=es5Strict while still having strict mode input.
Most helpful comment
You need to pass in
Otherwise the compiler overrides
--jscomp_off=es5Stricthere.AFAIK this is intentional, but missing documentation. Probably need to update https://github.com/google/closure-compiler/wiki/Warnings.