diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/drop-unused.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 20dab3b9..9c960561 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -700,3 +700,28 @@ issue_1539: { } } } + +vardef_value: { + options = { + keep_fnames: false, + reduce_vars: true, + unused: true, + } + input: { + function f() { + function g(){ + return x(); + } + var a = g(); + return a(42); + } + } + expect: { + function f() { + var a = function(){ + return x(); + }(); + return a(42); + } + } +} |