diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-04-24 13:04:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-24 20:04:31 +0800 |
commit | c296a63fb338a6edba6682d821351255e8935fd9 (patch) | |
tree | 7204e977014b8a6e240ab495bb43a2727657debb /test | |
parent | 10dd9d4eaf3d28479744676e344f0df6b6bd8029 (diff) | |
download | tracifyjs-c296a63fb338a6edba6682d821351255e8935fd9.tar.gz tracifyjs-c296a63fb338a6edba6682d821351255e8935fd9.zip |
fix corner case in `collapse_vars` (#4866)
fixes #4865
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/collapse_vars.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 451681b6..4051bb14 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -8993,3 +8993,20 @@ issue_4852: { } expect_stdout: "PASS" } + +issue_4865: { + options = { + collapse_vars: true, + } + input: { + var NaN; + var a = NaN = "PASS"; + console.log(a, NaN); + } + expect: { + var NaN; + var a = NaN = "PASS"; + console.log(a, NaN); + } + expect_stdout: true +} |