diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-03 02:39:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-03 02:39:57 +0800 |
commit | 70d72ad8065421908ff9a8658539359789c4f460 (patch) | |
tree | d9707768eba30f41634c46455685a72a30830b21 /test | |
parent | fe9227a41bd13a8e58be1e17636a96d09e0fd956 (diff) | |
download | tracifyjs-70d72ad8065421908ff9a8658539359789c4f460.tar.gz tracifyjs-70d72ad8065421908ff9a8658539359789c4f460.zip |
properly cover all cases of for-in loop variables (#1536)
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/reduce_vars.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index 87b1fc2e..557631bd 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -563,7 +563,7 @@ inner_var_for: { } } -inner_var_for_in: { +inner_var_for_in_1: { options = { evaluate: true, reduce_vars: true, @@ -590,6 +590,21 @@ inner_var_for_in: { } } +inner_var_for_in_2: { + options = { + evaluate: true, + reduce_vars: true, + } + input: { + for (var long_name in {}) + console.log(long_name); + } + expect: { + for (var long_name in {}) + console.log(long_name); + } +} + issue_1533_1: { options = { collapse_vars: true, |