We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object.keys()
In certain cases, unused Object.keys() is not elided.
Consider
Object.keys({ "a": 1, "b": 2, });
google-closure-compiler --js a.js -O ADVANCED outputs [JSC_USELESS_CODE] however
google-closure-compiler --js a.js -O ADVANCED
const a = Object.keys({ "a": 1, "b": 2, });
google-closure-compiler --js a.js -O ADVANCED outputs Object.keys({a:1,b:2});
Object.keys({a:1,b:2});
Namely assigning an Object.keys() to an unused variable leads to elimination of the variable but not the method call.
The externs definition seems correct but something else is interfering.
The text was updated successfully, but these errors were encountered:
Thank you for the report! We'll take a look at this when we can.
Sorry, something went wrong.
No branches or pull requests
In certain cases, unused Object.keys() is not elided.
Consider
google-closure-compiler --js a.js -O ADVANCED
outputs [JSC_USELESS_CODE] howevergoogle-closure-compiler --js a.js -O ADVANCED
outputsObject.keys({a:1,b:2});
Namely assigning an Object.keys() to an unused variable leads to elimination of the variable but not the method call.
The externs definition seems correct but something else is interfering.
The text was updated successfully, but these errors were encountered: