fix corner cases in join_vars (#5852)

fixes #5849
fixes #5850
This commit is contained in:
Alex Lam S.L
2024-06-17 09:11:11 +03:00
committed by GitHub
parent f31311e439
commit 23d74bedeb
3 changed files with 57 additions and 17 deletions

View File

@@ -1253,3 +1253,24 @@ issue_5602: {
]
node_version: ">=6"
}
issue_5850: {
options = {
evaluate: true,
join_vars: true,
unused: true,
}
input: {
var a = [ ..."FAIL" ];
a[0] = "P";
a[2] = a[3] = "S";
console.log(a.join(""));
}
expect: {
var a = [ ..."FAIL" ];
a[0] = "P";
a[2] = a[3] = "S";
console.log(a.join(""));
}
node_version: ">=6"
}