diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-03 18:31:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 02:31:20 +0800 |
commit | df2cfcb5fcd7e4549df5015580c838138cd24130 (patch) | |
tree | 056108b00afb853a963119efdc1290bb5063110d /test/compress | |
parent | 623a0d920f66656d7874a4bf005c24b44abb95a4 (diff) | |
download | tracifyjs-df2cfcb5fcd7e4549df5015580c838138cd24130.tar.gz tracifyjs-df2cfcb5fcd7e4549df5015580c838138cd24130.zip |
fix corner case in `evaluate` (#4501)
fixes #4500
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/destructured.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index c506e8f0..70c4392a 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -2302,3 +2302,27 @@ issue_4485_3: { expect_stdout: true node_version: ">=6" } + +issue_4500: { + options = { + evaluate: true, + keep_fnames: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + var a = function f(b) { + return [ b ] = [], b; + }("FAIL"); + console.log(a || "PASS"); + } + expect: { + var a = function f(b) { + return [ b ] = [], b; + }("FAIL"); + console.log(a || "PASS"); + } + expect_stdout: "PASS" + node_version: ">=6" +} |