fix corner case in templates (#5137)

fixes #5136
This commit is contained in:
Alex Lam S.L
2021-09-30 14:43:34 +01:00
committed by GitHub
parent 157521066f
commit 0b2573c3fa
2 changed files with 23 additions and 9 deletions

View File

@@ -685,3 +685,17 @@ issue_5125_8: {
expect_stdout: "undefinedundefinedundefined PASS"
node_version: ">=4"
}
issue_5136: {
options = {
templates: true,
}
input: {
console.log(`${A = []}${A[0] = 42}`);
}
expect: {
console.log(`` + (A = []) + (A[0] = 42));
}
expect_stdout: "42"
node_version: ">=4"
}