diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-15 13:28:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-15 13:28:30 +0800 |
commit | 8f681b1d1721e931852be48720d26ba052eac96c (patch) | |
tree | fc0f3a94f03fe79107fa3db5f46bef4249ce89c1 /test/compress/reduce_vars.js | |
parent | 90313875f75f68fecfc23c6c6f96f921da730301 (diff) | |
download | tracifyjs-8f681b1d1721e931852be48720d26ba052eac96c.tar.gz tracifyjs-8f681b1d1721e931852be48720d26ba052eac96c.zip |
handle `inline` of function arguments (#2590)
fixes #2476
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r-- | test/compress/reduce_vars.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index ff93079d..9ed9c974 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -1396,7 +1396,7 @@ defun_inline_3: { options = { evaluate: true, inline: true, - passes: 2, + passes: 3, reduce_funcs: true, reduce_vars: true, side_effects: true, @@ -2250,12 +2250,11 @@ redefine_farg_2: { console.log(f([]), g([]), h([])); } expect: { - console.log(function(a) { - return typeof a; - }([]), "number",function(a, b) { + console.log((a = [], typeof a), "number",function(a, b) { a = b; return typeof a; }([])); + var a; } expect_stdout: "object number undefined" } @@ -2266,7 +2265,7 @@ redefine_farg_3: { evaluate: true, inline: true, keep_fargs: false, - passes: 2, + passes: 3, reduce_funcs: true, reduce_vars: true, sequences: true, @@ -3107,6 +3106,7 @@ obj_var_2: { obj_arg_1: { options = { + collapse_vars: true, evaluate: true, inline: true, passes: 2, @@ -3138,9 +3138,10 @@ obj_arg_1: { obj_arg_2: { options = { + collapse_vars: true, evaluate: true, inline: true, - passes: 2, + passes: 3, properties: true, reduce_funcs: true, reduce_vars: true, |