From 41a6eb892a89eef1a6a238e2ce5bc36b86cf4fee Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 16 Jan 2020 01:51:37 +0800 Subject: fix corner case in `evaluate` (#3685) fixes #3684 --- test/compress/numbers.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/compress/numbers.js b/test/compress/numbers.js index fdfb6c2f..e6f6ce23 100644 --- a/test/compress/numbers.js +++ b/test/compress/numbers.js @@ -1215,3 +1215,21 @@ issue_3682_3: { } expect_stdout: "-Infinity" } + +issue_3684: { + options = { + evaluate: true, + } + input: { + console.log(1 / (-1 * (0 & console) + 0)); + console.log(1 / ((0 & console) / -1 + 0)); + } + expect: { + console.log(1 / (-1 * (0 & console) + 0)); + console.log(1 / ((0 & console) / -1 + 0)); + } + expect_stdout: [ + "Infinity", + "Infinity", + ] +} -- cgit v1.2.3