aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/destructured.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js
index 7cc6f46d..58fec606 100644
--- a/test/compress/destructured.js
+++ b/test/compress/destructured.js
@@ -2487,3 +2487,30 @@ issue_4554: {
expect_stdout: "PASS"
node_version: ">=6"
}
+
+issue_4584: {
+ options = {
+ evaluate: true,
+ reduce_vars: true,
+ }
+ input: {
+ try {
+ (function f({
+ [console.log(a = "FAIL")]: a,
+ }) {})(0);
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect: {
+ try {
+ (function f({
+ [console.log(a = "FAIL")]: a,
+ }) {})(0);
+ } catch (e) {
+ console.log("PASS");
+ }
+ }
+ expect_stdout: "PASS"
+ node_version: ">=6"
+}