aboutsummaryrefslogtreecommitdiff
path: root/test/compress/destructured.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/destructured.js')
-rw-r--r--test/compress/destructured.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js
index 78cd6863..41e337be 100644
--- a/test/compress/destructured.js
+++ b/test/compress/destructured.js
@@ -2592,3 +2592,36 @@ issue_4608_2: {
expect_stdout: "f"
node_version: ">=6"
}
+
+issue_4994: {
+ options = {
+ loops: true,
+ unused: true,
+ }
+ input: {
+ var a = "FAIL";
+ (function([
+ {
+ [function() {
+ for (a in { PASS: null });
+ }()]: b,
+ },
+ ]) {
+ var a;
+ })([ 42 ]);
+ console.log(a);
+ }
+ expect: {
+ var a = "FAIL";
+ (function([
+ {
+ [function() {
+ for (a in { PASS: null });
+ }()]: b,
+ },
+ ]) {})([ 42 ]);
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+ node_version: ">=6"
+}