From acfeaf4e70459799314e6246c35a4d05fb70ebd4 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Mon, 24 Apr 2017 01:52:16 +0800 Subject: [PATCH] more test --- test/compress/functions.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/test/compress/functions.js b/test/compress/functions.js index 32c59d91..2a2d0965 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -94,7 +94,7 @@ issue_485_crashing_1530: { } } -issue_1841: { +issue_1841_1: { options = { keep_fargs: false, pure_getters: "strict", @@ -119,3 +119,29 @@ issue_1841: { } expect_exact: "42" } + +issue_1841_2: { + options = { + keep_fargs: false, + pure_getters: false, + reduce_vars: true, + unused: true, + } + input: { + var b = 10; + !function(arg) { + for (var key in "hi") + var n = arg.baz, n = [ b = 42 ]; + }(--b); + console.log(b); + } + expect: { + var b = 10; + !function(arg) { + for (var key in "hi") + arg.baz, b = 42; + }(--b); + console.log(b); + } + expect_exact: "42" +}