mishoo/UglifyJS — Issue #274: unused VariableDeclarations are keepd even with --lift-vars options.
Author: leeight
Created: 2011-12-15 10:42:59+00:00
State: open

discussion thread link
https://groups.google.com/forum/?hl=en#!topic/uglifyjs/1rqW6afjkis

sample code:
```javascript
var UNUSED_VAR1 = 19;

function main() {
var unused_var2 = 20;
alert(100);
}

main();

the actual result:
```shell
$ bin/uglifyjs -nc --unsafe --lift-vars b.js
function main(){var a=20;alert(100)}var UNUSED_VAR1=19;main();

the expected result:
```shell
$ bin/uglifyjs -nc --unsafe --lift-vars b.js
function main(){alert(100)};main();