fix corner case in side_effects (#5299)

fixes #5298
This commit is contained in:
Alex Lam S.L
2022-01-15 18:33:14 +00:00
committed by GitHub
parent dfd6418878
commit d96c59f9e6
2 changed files with 26 additions and 1 deletions

View File

@@ -2676,3 +2676,26 @@ issue_5258_2: {
expect_stdout: "PASS"
node_version: ">=8"
}
issue_5298: {
options = {
awaits: true,
side_effects: true,
}
input: {
var a = "PASS";
(async function() {
for (a in [ 42 in null ]);
})();
console.log(a);
}
expect: {
var a = "PASS";
(async function() {
for (a in [ 42 in null ]);
})();
console.log(a);
}
expect_stdout: "PASS"
node_version: ">=8"
}