diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/numbers.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/compress/numbers.js b/test/compress/numbers.js index f49996a4..c40ca09d 100644 --- a/test/compress/numbers.js +++ b/test/compress/numbers.js @@ -1135,3 +1135,35 @@ issue_3655: { "0", ] } + +issue_3676_1: { + options = { + evaluate: true, + unsafe_math: true, + } + input: { + var a = []; + console.log(false - (a - (a[1] = 42))); + } + expect: { + var a = []; + console.log(false - (a - (a[1] = 42))); + } + expect_stdout: "NaN" +} + +issue_3676_2: { + options = { + evaluate: true, + unsafe_math: true, + } + input: { + var a; + console.log(false - ((a = []) - (a[1] = 42))); + } + expect: { + var a; + console.log(false - ((a = []) - (a[1] = 42))); + } + expect_stdout: "NaN" +} |