From 0a42457df64944187a069b26491fcebd8ce55ce0 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 27 Feb 2021 01:26:15 +0000 Subject: fix corner case with `arguments` (#4697) fixes #4696 --- test/compress/arguments.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/compress') diff --git a/test/compress/arguments.js b/test/compress/arguments.js index 655d75a4..4c602a68 100644 --- a/test/compress/arguments.js +++ b/test/compress/arguments.js @@ -977,3 +977,25 @@ issue_4432: { } expect_stdout: "PASS" } + +issue_4696: { + options = { + arguments: true, + keep_fargs: false, + } + input: { + console.log(function() { + for (arguments in [ 42 ]); + for (var a in arguments[0]) + return "PASS"; + }()); + } + expect: { + console.log(function() { + for (arguments in [ 42 ]); + for (var a in arguments[0]) + return "PASS"; + }()); + } + expect_stdout: "PASS" +} -- cgit v1.2.3