From c296a63fb338a6edba6682d821351255e8935fd9 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 24 Apr 2021 13:04:31 +0100 Subject: fix corner case in `collapse_vars` (#4866) fixes #4865 --- test/compress/collapse_vars.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/compress/collapse_vars.js') 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 +} -- cgit v1.2.3