diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-03-15 04:44:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 12:44:41 +0800 |
commit | 2619bff3cf71bbb4be9b0178272af72b42878496 (patch) | |
tree | d00415d4109519cc3bf017ccee30a758a6c29cb5 /test | |
parent | 4fb54b066fc590ea7bd161ba8afa5fc1d4b34d2e (diff) | |
download | tracifyjs-2619bff3cf71bbb4be9b0178272af72b42878496.tar.gz tracifyjs-2619bff3cf71bbb4be9b0178272af72b42878496.zip |
fix corner case in `conditionals` (#4777)
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/spreads.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/compress/spreads.js b/test/compress/spreads.js index a3a70035..ba10167a 100644 --- a/test/compress/spreads.js +++ b/test/compress/spreads.js @@ -85,7 +85,7 @@ collapse_vars_4: { node_version: ">=6" } -conditionals_farg: { +conditionals_farg_1: { options = { conditionals: true, } @@ -107,6 +107,28 @@ conditionals_farg: { node_version: ">=6" } +conditionals_farg_2: { + options = { + conditionals: true, + pure_getters: "strict", + reduce_vars: true, + } + input: { + var log = console.log; + (function(a) { + return a.length ? log(...a) : log("FAIL"); + })([ "PASS" ]); + } + expect: { + var log = console.log; + (function(a) { + return a.length ? log(...a) : log("FAIL"); + })([ "PASS" ]); + } + expect_stdout: "PASS" + node_version: ">=6" +} + dont_inline: { options = { inline: true, |