diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/hoist_props.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/hoist_props.js b/test/compress/hoist_props.js index b055ae7b..0d8e771a 100644 --- a/test/compress/hoist_props.js +++ b/test/compress/hoist_props.js @@ -886,3 +886,31 @@ issue_3411: { } expect_stdout: "PASS" } + +issue_3440: { + options = { + hoist_props: true, + reduce_vars: true, + unused: true, + } + input: { + (function() { + function f() { + console.log(o.p); + } + var o = { + p: "PASS", + }; + return f; + })()(); + } + expect: { + (function() { + var o_p = "PASS"; + return function() { + console.log(o_p); + }; + })()(); + } + expect_stdout: "PASS" +} |