diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-10-14 00:58:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 07:58:04 +0800 |
commit | 7f35d9cee05528574a24cbdad5593403db07cbf0 (patch) | |
tree | 28f965702e1993333ba665c55c3d42d75a4b2bfc /test/compress/const.js | |
parent | 9f8106e1d845f66033c3c73e2e3844cf32fd4bb2 (diff) | |
download | tracifyjs-7f35d9cee05528574a24cbdad5593403db07cbf0.tar.gz tracifyjs-7f35d9cee05528574a24cbdad5593403db07cbf0.zip |
fix corner case in `reduce_vars` (#4219)
fixes #4218
Diffstat (limited to 'test/compress/const.js')
-rw-r--r-- | test/compress/const.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/const.js b/test/compress/const.js index 27c55ddb..8c04c6b1 100644 --- a/test/compress/const.js +++ b/test/compress/const.js @@ -931,6 +931,30 @@ issue_4207: { expect_stdout: "0" } +issue_4218: { + options = { + reduce_funcs: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + { + const a = function() {}; + var b = 0 * a; + } + console.log(typeof a, b); + } + expect: { + { + const a = function() {}; + var b = 0 * a; + } + console.log(typeof a, b); + } + expect_stdout: true +} + issue_4210: { options = { reduce_vars: true, |