Fix walker not able to handle destr pattern in spread when compressing (#1438)

This commit is contained in:
Anthony Van de Gejuchte
2017-04-03 19:23:22 +02:00
committed by Alex Lam S.L
parent 603d92effc
commit 2377171200
2 changed files with 12 additions and 2 deletions

View File

@@ -151,8 +151,12 @@ destructuring_remove_unused_1: {
function e() {
var unused = "foo";
var a = [1, 2, 3, 4, 5];
var x = [[1, 2, 3]];
var y = {h: 1};
var [b, ...c] = a;
f(b, c);
var [...[e, f]] = x;
var [...{g: h}] = y;
f(b, c, e, f, g);
}
}
expect: {
@@ -178,8 +182,12 @@ destructuring_remove_unused_1: {
}
function e() {
var a = [1, 2, 3, 4, 5];
var x = [[1, 2, 3]];
var y = {h: 1};
var [b, ...c] = a;
f(b, c);
var [...[e, f]] = x;
var [...{g: h}] = y;
f(b, c, e, f, g);
}
}
}