fix corner cases related to in (#3964)

This commit is contained in:
Alex Lam S.L
2020-06-07 22:23:23 +01:00
committed by GitHub
parent 28b7b15da1
commit df3bb8028a
7 changed files with 106 additions and 11 deletions

View File

@@ -274,3 +274,26 @@ drop_value: {
foo(), bar();
}
}
operator_in: {
options = {
side_effects: true,
}
input: {
try {
"foo" in true;
console.log("FAIL");
} catch (e) {
console.log("PASS");
}
}
expect: {
try {
0 in true;
console.log("FAIL");
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
}