From 18302bf8e9507bbb661986e37cf66a95e6017271 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 29 Nov 2017 13:32:00 +0800 Subject: backport test from #2526 (#2534) --- test/compress/reduce_vars.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') 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(); + } + } +} -- cgit v1.2.3