From 9b7a13c8c7f06598b3da8da29da4e8e5680cd24e Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 12 Oct 2020 05:43:26 +0100 Subject: fix corner case in `ie8` & `mangle` (#4196) fixes #4195 --- test/compress/const.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'test') diff --git a/test/compress/const.js b/test/compress/const.js index f09dc56f..6cd1124a 100644 --- a/test/compress/const.js +++ b/test/compress/const.js @@ -747,3 +747,32 @@ issue_4193: { } expect_stdout: true } + +issue_4195: { + mangle = { + ie8: true, + } + input: { + console.log(function f(a) { + (function a() { + { + const b = f, a = 0; + b; + } + })(); + a && f; + }()); + } + expect: { + console.log(function f(o) { + (function o() { + { + const n = f, o = 0; + n; + } + })(); + o && f; + }()); + } + expect_stdout: "undefined" +} -- cgit v1.2.3