From 2e0ad40fe6635f7754a3e4dcdfb3b5bff75f4ae5 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 30 Oct 2020 03:06:31 +0000 Subject: fix corner case in `ie8` (#4251) fixes #4250 --- test/compress/ie8.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'test') diff --git a/test/compress/ie8.js b/test/compress/ie8.js index 2a7dace3..c5b8b155 100644 --- a/test/compress/ie8.js +++ b/test/compress/ie8.js @@ -2877,3 +2877,30 @@ issue_4235: { } expect_stdout: "undefined" } + +issue_4250: { + options = { + ie8: true, + loops: true, + unused: true, + } + input: { + console.log(function f() { + (function() { + for (f in "f"); + })(); + return f; + var f; + }()); + } + expect: { + console.log(function f() { + (function() { + for (f in "f"); + })(); + return f; + var f; + }()); + } + expect_stdout: "0" +} -- cgit v1.2.3