fix corner case in collapse_vars (#4915)

fixes #4914
This commit is contained in:
Alex Lam S.L
2021-05-07 18:14:59 +01:00
committed by GitHub
parent 19d232badb
commit ac1f7d689b
2 changed files with 21 additions and 0 deletions

View File

@@ -9151,3 +9151,23 @@ issue_4910: {
}
expect_stdout: "bar foo"
}
issue_4914: {
options = {
collapse_vars: true,
pure_getters: "strict",
}
input: {
console.log(typeof function f() {
f.__proto__ = 42;
return f.__proto__;
}());
}
expect: {
console.log(typeof function f() {
f.__proto__ = 42;
return f.__proto__;
}());
}
expect_stdout: "function"
}