diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-16 20:47:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 04:47:48 +0800 |
commit | f68e267830c94f129df4c9e93674abfafbc0125b (patch) | |
tree | bac0fbdd864b40346222a1e0634ab879832f6824 /test | |
parent | 8b10b93ee1cd583aa15f608a89a51353a1828944 (diff) | |
download | tracifyjs-f68e267830c94f129df4c9e93674abfafbc0125b.tar.gz tracifyjs-f68e267830c94f129df4c9e93674abfafbc0125b.zip |
fix corner case in `reduce_vars` (#4384)
fixes #4383
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/destructured.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 086790f0..9fd425d1 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -1844,3 +1844,25 @@ issue_4372_2: { expect_stdout: "PASS" node_version: ">=6" } + +issue_4383: { + options = { + evaluate: true, + reduce_vars: true, + unsafe: true, + } + input: { + console.log(function(a) { + [ a[0] ] = []; + return a.length; + }([])); + } + expect: { + console.log(function(a) { + [ a[0] ] = []; + return a.length; + }([])); + } + expect_stdout: "1" + node_version: ">=6" +} |