fix unused crashes (#1599)

- `AST_DefaultAssign` on `keep_fargs`
- `AST_Expansion on` `keep_fargs`
- `AST_Destructuring` on top-level declarations without `toplevel`
This commit is contained in:
Alex Lam S.L
2017-03-14 13:13:43 +08:00
committed by GitHub
parent c7063c1f38
commit 1dd339f95e
4 changed files with 65 additions and 13 deletions

View File

@@ -293,3 +293,17 @@ reduce_vars: {
for ([x,y] in pairs);
}
}
unused: {
options = {
unused: true,
}
input: {
let { foo: [, , ...a] } = { foo: [1, 2, 3, 4], bar: 5 };
console.log(a);
}
expect: {
let { foo: [, , ...a] } = { foo: [1, 2, 3, 4], bar: 5 };
console.log(a);
}
}