diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-26 18:56:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 18:56:59 +0800 |
commit | 7f342cb3e3abd3e39b18e62a2e9d6b8020d82773 (patch) | |
tree | 929edf593db5899b1b5632094d76a624ae89b88b /test/compress/functions.js | |
parent | 05e7d34ed480429cc26c8eedd675263cd0d94a3e (diff) | |
download | tracifyjs-7f342cb3e3abd3e39b18e62a2e9d6b8020d82773.tar.gz tracifyjs-7f342cb3e3abd3e39b18e62a2e9d6b8020d82773.zip |
suppress `inline` within substituted `AST_Scope` (#2658)
fixes #2657
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index 02b4ab39..7f35de76 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -1447,3 +1447,33 @@ recursive_inline: { } expect: {} } + +issue_2657: { + options = { + inline: true, + reduce_vars: true, + sequences: true, + unused: true, + } + input: { + "use strict"; + console.log(function f() { + return h; + function g(b) { + return b || b(); + } + function h(a) { + g(a); + return a; + } + }()(42)); + } + expect: { + "use strict"; + console.log(function(a) { + return b = a, b || b(), a; + var b; + }(42)); + } + expect_stdout: "42" +} |