compress new function containing this (#2417)

This commit is contained in:
Alex Lam S.L
2017-10-30 23:19:27 +08:00
committed by GitHub
parent 2fd927a7cc
commit a48f87abf2
3 changed files with 61 additions and 13 deletions

View File

@@ -1006,3 +1006,22 @@ array_hole: {
}
expect_stdout: "2 undefined 3"
}
new_this: {
options = {
properties: true,
side_effects: true,
}
input: {
new {
f: function(a) {
this.a = a;
}
}.f(42);
}
expect: {
new function(a) {
this.a = a;
}(42);
}
}