diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/rests.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/compress/rests.js b/test/compress/rests.js index ed927700..6bc5b756 100644 --- a/test/compress/rests.js +++ b/test/compress/rests.js @@ -600,3 +600,49 @@ issue_4538: { expect_stdout: "function" node_version: ">=6" } + +issue_4544_1: { + options = { + keep_fnames: true, + side_effects: true, + } + input: { + try { + (function f(...[ {} ]) {})(); + } catch (e) { + console.log("PASS"); + } + } + expect: { + try { + [ ...[ {} ] ] = []; + } catch (e) { + console.log("PASS"); + } + } + expect_stdout: "PASS" + node_version: ">=6" +} + +issue_4544_2: { + options = { + keep_fnames: true, + side_effects: true, + } + input: { + try { + (function f(a, ...[ {} ]) {})([]); + } catch (e) { + console.log("PASS"); + } + } + expect: { + try { + [ , ...[ {} ] ] = [ [] ]; + } catch (e) { + console.log("PASS"); + } + } + expect_stdout: "PASS" + node_version: ">=6" +} |