diff options
Diffstat (limited to 'test/compress/sequences.js')
-rw-r--r-- | test/compress/sequences.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/compress/sequences.js b/test/compress/sequences.js index 7bb274cb..41cfc726 100644 --- a/test/compress/sequences.js +++ b/test/compress/sequences.js @@ -251,3 +251,36 @@ iife: { function d() {}(), function e() {}(), function f() {}(), function g() {}(); } } + +unsafe_undefined: { + options = { + conditionals: true, + if_return: true, + sequences: true, + side_effects: true, + unsafe: true, + } + input: { + function f(undefined) { + if (a) + return b; + if (c) + return d; + } + function g(undefined) { + if (a) + return b; + if (c) + return d; + e(); + } + } + expect: { + function f(undefined) { + return a ? b : c ? d : undefined; + } + function g(undefined) { + return a ? b : c ? d : void e(); + } + } +} |