handle modifications to this correctly (#3036)

fixes #3032
This commit is contained in:
Alex Lam S.L
2018-03-30 15:07:36 +09:00
committed by GitHub
parent 9f9db504d7
commit 06b9894c19
2 changed files with 25 additions and 0 deletions

View File

@@ -5303,3 +5303,27 @@ issue_2974: {
}
expect_stdout: "1"
}
issue_3032: {
options = {
collapse_vars: true,
pure_getters: true,
}
input: {
console.log({
f: function() {
this.a = 42;
return [ this.a, !1 ];
}
}.f()[0]);
}
expect: {
console.log({
f: function() {
this.a = 42;
return [ this.a, !1 ];
}
}.f()[0]);
}
expect_stdout: "42"
}