aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-27 01:26:15 +0000
committerGitHub <noreply@github.com>2021-02-27 09:26:15 +0800
commit0a42457df64944187a069b26491fcebd8ce55ce0 (patch)
tree346d0655d7aaf2a828c6aeb66aabedc92b57cf19 /test/compress
parentba4a771bbccb0b6026588a56b0c31f5bac466775 (diff)
downloadtracifyjs-0a42457df64944187a069b26491fcebd8ce55ce0.tar.gz
tracifyjs-0a42457df64944187a069b26491fcebd8ce55ce0.zip
fix corner case with `arguments` (#4697)
fixes #4696
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/arguments.js22
1 files changed, 22 insertions, 0 deletions
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"
+}