reduce this in block scopes (#2526)

fixes #2455
This commit is contained in:
Alex Lam S.L
2017-11-28 22:54:21 +08:00
committed by GitHub
parent 37cbd7080c
commit 62d2817d6c
4 changed files with 24 additions and 8 deletions

View File

@@ -4887,3 +4887,21 @@ issue_2416: {
expect_stdout: "Foo"
node_version: ">=6"
}
issue_2455: {
options = {
reduce_vars: true,
unused: true,
}
input: {
function foo() {
var that = this;
for (;;) that.bar();
}
}
expect: {
function foo() {
for (;;) this.bar();
}
}
}