diff options
Diffstat (limited to 'test/compress/issue-1052.js')
-rw-r--r-- | test/compress/issue-1052.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/issue-1052.js b/test/compress/issue-1052.js new file mode 100644 index 00000000..067eea4a --- /dev/null +++ b/test/compress/issue-1052.js @@ -0,0 +1,27 @@ +hoist_funs_when_handling_if_return_rerversal: { + options = { if_return: true, hoist_funs: false }; + input: { + "use strict"; + + ( function() { + if ( !window ) { + return; + } + + function f() {} + function g() {} + } )(); + } + expect: { + "use strict"; + + ( function() { + function f() {} + function g() {} + + // NOTE: other compression steps will reduce this + // down to just `window`. + if ( window ); + } )(); + } +} |