diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-02-08 10:31:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-08 18:31:08 +0800 |
commit | 357d8612462c826f9e0e85b4d3a1c790f6de7057 (patch) | |
tree | 3f467e4caaf28625b0b240cb12bf461d762fe05e /test/compress | |
parent | fd4caf7a9cbfaa482d8cc77d2bc8cd00e8bc256a (diff) | |
download | tracifyjs-357d8612462c826f9e0e85b4d3a1c790f6de7057.tar.gz tracifyjs-357d8612462c826f9e0e85b4d3a1c790f6de7057.zip |
fix corner case in `conditionals` (#4624)
fixes #4623
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/yields.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/compress/yields.js b/test/compress/yields.js index 2c06a4ac..2d29c9b6 100644 --- a/test/compress/yields.js +++ b/test/compress/yields.js @@ -587,3 +587,18 @@ issue_4618: { expect_stdout: "function" node_version: ">=4" } + +issue_4623: { + options = { + conditionals: true, + } + input: { + if (console ? function*() {} : 0) + console.log("PASS"); + } + expect: { + (console ? function*() {} : 0) && console.log("PASS"); + } + expect_stdout: "PASS" + node_version: ">=4" +} |