fix corner case in properties (#5351)

fixes #5350
This commit is contained in:
Alex Lam S.L
2022-02-12 22:09:33 +00:00
committed by GitHub
parent a14555a39e
commit 63b92ead4e
2 changed files with 36 additions and 2 deletions

View File

@@ -3444,3 +3444,33 @@ issue_5269_3_ie: {
"bar",
]
}
issue_5350: {
options = {
ie: false,
properties: true,
side_effects: true,
}
input: {
console.log(typeof f, [ 42, function f() {} ][0]);
}
expect: {
console.log(typeof f, 42);
}
expect_stdout: "undefined 42"
}
issue_5350_ie: {
options = {
ie: true,
properties: true,
side_effects: true,
}
input: {
console.log(typeof f, [ 42, function f() {} ][0]);
}
expect: {
console.log(typeof f, (function f() {}, 42));
}
expect_stdout: "undefined 42"
}