From: Alex Lam S.L Date: Wed, 29 Nov 2017 05:32:00 +0000 (+0800) Subject: backport test from #2526 (#2534) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=18302bf8e9507bbb661986e37cf66a95e6017271;p=UglifyJS.git backport test from #2526 (#2534) --- diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index 82b5ad6d..a8c151f1 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -4525,3 +4525,21 @@ issue_2485: { } expect_stdout: "6" } + +issue_2455: { + options = { + reduce_vars: true, + unused: true, + } + input: { + function foo() { + var that = this; + for (;;) that.bar(); + } + } + expect: { + function foo() { + for (;;) this.bar(); + } + } +}