diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-10-28 19:56:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-28 19:56:42 +0800 |
commit | f38e31bd1ee117fc8adb0d13982b5ec16e761f52 (patch) | |
tree | fc1b28e3d86cc912b0287c5007579f4a774e5726 /test/compress/numbers.js | |
parent | 24e8b479775d9d264c5f8ae33bcfef204a3ff969 (diff) | |
download | tracifyjs-f38e31bd1ee117fc8adb0d13982b5ec16e761f52.tar.gz tracifyjs-f38e31bd1ee117fc8adb0d13982b5ec16e761f52.zip |
fix corner case in `evaluate` (#3540)
fixes #3539
Diffstat (limited to 'test/compress/numbers.js')
-rw-r--r-- | test/compress/numbers.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/compress/numbers.js b/test/compress/numbers.js index 63a100b7..79fccfb4 100644 --- a/test/compress/numbers.js +++ b/test/compress/numbers.js @@ -765,3 +765,19 @@ issue_3536: { } expect_stdout: "number 99 11 121" } + +issue_3539: { + options = { + evaluate: true, + unsafe_math: true, + } + input: { + var a = -0 + -""; + console.log(0/a, 1/a, -1/a); + } + expect: { + var a = -0; + console.log(0/a, 1/a, -1/a); + } + expect_stdout: "NaN -Infinity Infinity" +} |