diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-04-23 01:51:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-23 01:51:56 +0800 |
commit | 45ce3694807ee0daeb7e0f84c12ffbd8ca4f733c (patch) | |
tree | 7acd82d0f499a80dd2f75e3291c4abf13aed8c34 /test | |
parent | ca32a09032b3e7d6aac1f0b01f67a0b67b3037f1 (diff) | |
download | tracifyjs-45ce3694807ee0daeb7e0f84c12ffbd8ca4f733c.tar.gz tracifyjs-45ce3694807ee0daeb7e0f84c12ffbd8ca4f733c.zip |
fix `AST_For.init` patch-up in `drop_unused()` (#1839)
fixes #1838
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/drop-unused.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 7456f676..c702cfaf 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -1092,3 +1092,25 @@ issue_1830_2: { } expect_stdout: "1" } + +issue_1838: { + options = { + join_vars: true, + loops: true, + unused: true, + } + beautify = { + beautify: true, + } + input: { + function f() { + var b = a; + while (c); + } + } + expect_exact: [ + "function f() {", + " for (a; c; ) ;", + "}", + ] +} |