diff options
Diffstat (limited to 'test/compress/destructured.js')
-rw-r--r-- | test/compress/destructured.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 7fe2f0c8..98e84f48 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -2164,3 +2164,36 @@ issue_4446: { expect_stdout: "PASS" node_version: ">=6" } + +issue_4456: { + options = { + pure_getters: true, + unused: true, + } + input: { + var o = { + set p(v) { + console.log(v); + }, + }; + [ function() { + try { + return o; + } catch ({}) {} + }().p ] = [ "PASS" ]; + } + expect: { + var o = { + set p(v) { + console.log(v); + }, + }; + [ function() { + try { + return o; + } catch ({}) {} + }().p ] = [ "PASS" ]; + } + expect_stdout: "PASS" + node_version: ">=6" +} |