diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-10-13 00:32:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 07:32:17 +0800 |
commit | 176c09c6a5408ef0a8ddca8da7eb930c9d5e2745 (patch) | |
tree | 46f7b9e1821b3a0ab5a15106075fb574ae5c36f2 /test | |
parent | 9272f662c0c89387a2bc9e7a47024ccc9d0c09a4 (diff) | |
download | tracifyjs-176c09c6a5408ef0a8ddca8da7eb930c9d5e2745.tar.gz tracifyjs-176c09c6a5408ef0a8ddca8da7eb930c9d5e2745.zip |
fix corner case in `reduce_vars` & `unused` (#4208)
fixes #4207
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/const.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/const.js b/test/compress/const.js index d1164cc1..aedfdbc3 100644 --- a/test/compress/const.js +++ b/test/compress/const.js @@ -909,3 +909,24 @@ issue_4205: { } expect_stdout: true } + +issue_4207: { + options = { + reduce_funcs: true, + reduce_vars: true, + unused: true, + } + input: { + { + const a = function() {}; + console.log(a.length); + } + } + expect: { + { + const a = function() {}; + console.log(a.length); + } + } + expect_stdout: "0" +} |