diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-08 05:03:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 13:03:21 +0800 |
commit | 7fe8c9150ac68fb13716e465872ed9e15d7a5126 (patch) | |
tree | e43af5ae6f754bdeab9297b1f21b5b05a740fb4d /test | |
parent | 6c419bc083e097337960f1a19d2c352336d75e16 (diff) | |
download | tracifyjs-7fe8c9150ac68fb13716e465872ed9e15d7a5126.tar.gz tracifyjs-7fe8c9150ac68fb13716e465872ed9e15d7a5126.zip |
fix corner case in `assignments` (#4522)
fixes #4521
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/assignments.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/compress/assignments.js b/test/compress/assignments.js index 0f87f9a0..5bc971a5 100644 --- a/test/compress/assignments.js +++ b/test/compress/assignments.js @@ -461,3 +461,17 @@ issue_3949_2: { } expect_stdout: "100" } + +issue_4521: { + options = { + assignments: true, + dead_code: true, + } + input: { + var a = (a = 42 | a) ? console.log(a) : 0; + } + expect: { + var a = (a |= 42) ? console.log(a) : 0; + } + expect_stdout: "42" +} |