aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/compress.js6
-rw-r--r--test/compress/default-values.js4
-rw-r--r--test/compress/yields.js2
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/compress.js b/lib/compress.js
index b2825ada..16d86d90 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -8738,9 +8738,9 @@ merge(Compressor.prototype, {
}
function make_void_lhs(orig) {
- return make_node(AST_Sub, orig, {
- expression: make_node(AST_Number, orig, { value: 0 }),
- property: make_node(AST_Number, orig, { value: 0 }),
+ return make_node(AST_Dot, orig, {
+ expression: make_node(AST_Array, orig, { elements: [] }),
+ property: "e",
});
}
diff --git a/test/compress/default-values.js b/test/compress/default-values.js
index ac89b1ed..d4e51750 100644
--- a/test/compress/default-values.js
+++ b/test/compress/default-values.js
@@ -473,7 +473,7 @@ inline_side_effects_2: {
}
expect: {
var a = 42;
- [ 0[0] = --a ] = [ console ];
+ [ [].e = --a ] = [ console ];
console.log(a);
}
expect_stdout: "42"
@@ -1477,7 +1477,7 @@ issue_4502_4: {
(function(a, b = console.log("FAIL")) {})(..."" + console.log(42));
}
expect: {
- [ , 0[0] = console.log("FAIL") ] = [ ..."" + console.log(42) ];
+ [ , [].e = console.log("FAIL") ] = [ ..."" + console.log(42) ];
}
expect_stdout: "42"
node_version: ">=6"
diff --git a/test/compress/yields.js b/test/compress/yields.js
index eac47e22..dc3dacf5 100644
--- a/test/compress/yields.js
+++ b/test/compress/yields.js
@@ -690,7 +690,7 @@ drop_body: {
})([ console.log("baz") ]);
}
expect: {
- [ [ , 0[0] = console.log("foo") ] ] = [ [ console.log("baz") ] ];
+ [ [ , [].e = console.log("foo") ] ] = [ [ console.log("baz") ] ];
}
expect_stdout: [
"baz",