diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-28 17:02:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-28 17:02:20 +0800 |
commit | fb177a6312ccd90918c9f8f0f867c2fddd85a2c8 (patch) | |
tree | 1dd736b01a7262fcb5dd1504d8de9a5100cbe869 /test/compress | |
parent | 65da9acce6bd2548e5ffc7f35527ff62ff3f2fdd (diff) | |
download | tracifyjs-fb177a6312ccd90918c9f8f0f867c2fddd85a2c8.tar.gz tracifyjs-fb177a6312ccd90918c9f8f0f867c2fddd85a2c8.zip |
drop anonymous function name when overshadowed by other declarations (#1712)
fixes #1709
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/drop-unused.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index fabf8d9f..10ca5499 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -805,3 +805,42 @@ issue_1656: { } expect_exact: "for (;;) ;" } + +issue_1709: { + options = { + unused: true, + } + input: { + console.log( + function x() { + var x = 1; + return x; + }(), + function y() { + const y = 2; + return y; + }(), + function z() { + function z() {} + return z; + }() + ); + } + expect: { + console.log( + function() { + var x = 1; + return x; + }(), + function() { + const y = 2; + return y; + }(), + function() { + function z() {} + return z; + }() + ); + } + expect_stdout: true +} |