diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-01-28 02:04:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 02:04:44 +0800 |
commit | 0dcedad2d5a6b670ecd5aef3cf18d5e511af6e91 (patch) | |
tree | 4ebdc0ef0fa3e9590377ddc20c54e01086ff9a3e /test | |
parent | 36a430cd1e4a838602adace6f3321496992687c6 (diff) | |
download | tracifyjs-0dcedad2d5a6b670ecd5aef3cf18d5e511af6e91.tar.gz tracifyjs-0dcedad2d5a6b670ecd5aef3cf18d5e511af6e91.zip |
fix corner case in `booleans` (#3691)
fixes #3690
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/booleans.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/booleans.js b/test/compress/booleans.js index e1fa1a4f..6e7988bf 100644 --- a/test/compress/booleans.js +++ b/test/compress/booleans.js @@ -131,3 +131,25 @@ issue_3658: { } expect_stdout: "PASS" } + +issue_3690: { + options = { + booleans: true, + unused: true, + } + input: { + console.log(function(a) { + return function() { + return a = [ this ]; + }() ? "PASS" : "FAIL"; + }()); + } + expect: { + console.log(function(a) { + return function() { + return 1; + }() ? "PASS" : "FAIL"; + }()); + } + expect_stdout: "PASS" +} |