From 3aa765e4296c4caf2f3b2b3e6b43b65caf05a28f Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 26 Aug 2020 12:45:38 +0100 Subject: fix corner case in `evaluate` (#4078) fixes #4077 --- test/compress/evaluate.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/compress') diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 9f97ba99..6d4d084d 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -2894,3 +2894,17 @@ issue_4067: { } expect_stdout: "NaN" } + +issue_4077: { + options = { + evaluate: true, + unsafe: true, + } + input: { + console.log((a = []) - (a[0]++, 1) || "PASS"); + } + expect: { + console.log((a = []) - (a[0]++, 1) || "PASS"); + } + expect_stdout: "PASS" +} -- cgit v1.2.3