aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/compress/spread.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/spread.js b/test/compress/spread.js
index 01818dc3..21ccbe6d 100644
--- a/test/compress/spread.js
+++ b/test/compress/spread.js
@@ -399,3 +399,29 @@ issue_4329: {
expect_stdout: "PASS"
node_version: ">=8"
}
+
+issue_4331: {
+ options = {
+ collapse_vars: true,
+ toplevel: true,
+ }
+ input: {
+ var a = "PASS", b;
+ console,
+ b = a;
+ (function() {
+ a++;
+ })(...a);
+ console.log(b);
+ }
+ expect: {
+ var a = "PASS", b;
+ console;
+ (function() {
+ a++;
+ })(...b = a);
+ console.log(b);
+ }
+ expect_stdout: "PASS"
+ node_version: ">=8"
+}