fix corner case in unused (#5668)

fixes #5663
This commit is contained in:
Alex Lam S.L
2022-09-17 06:32:41 +01:00
committed by GitHub
parent e4bff315eb
commit eb22f0101e
4 changed files with 47 additions and 5 deletions

View File

@@ -1306,7 +1306,7 @@ keep_reference: {
}
expect: {
var a = [ {}, 42 ];
var [ b ] = a;
var b = a[0];
console.log(a[0] === b ? "PASS" : "FAIL");
}
expect_stdout: "PASS"