aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/destructured.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js
index eb6834a4..82d02172 100644
--- a/test/compress/destructured.js
+++ b/test/compress/destructured.js
@@ -1777,3 +1777,32 @@ issue_4323: {
expect_stdout: "function"
node_version: ">=6"
}
+
+issue_4355: {
+ options = {
+ loops: true,
+ unused: true,
+ }
+ input: {
+ var a;
+ (function({
+ [function() {
+ for (a in "foo");
+ }()]: b,
+ }) {
+ var a;
+ })(0);
+ console.log(a);
+ }
+ expect: {
+ var a;
+ (function({
+ [function() {
+ for (a in "foo");
+ }()]: b,
+ }) {})(0);
+ console.log(a);
+ }
+ expect_stdout: "2"
+ node_version: ">=6"
+}