aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-11-29 13:32:00 +0800
committerGitHub <noreply@github.com>2017-11-29 13:32:00 +0800
commit18302bf8e9507bbb661986e37cf66a95e6017271 (patch)
tree7bc33918826fd2da5231f7780401496d4d42ed00 /test
parentbc5047c1e70594ea2fa8e747945a577298715926 (diff)
downloadtracifyjs-18302bf8e9507bbb661986e37cf66a95e6017271.tar.gz
tracifyjs-18302bf8e9507bbb661986e37cf66a95e6017271.zip
backport test from #2526 (#2534)
Diffstat (limited to 'test')
-rw-r--r--test/compress/reduce_vars.js18
1 files changed, 18 insertions, 0 deletions
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();
+ }
+ }
+}