aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/spreads.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/spreads.js b/test/compress/spreads.js
index 1e4dcbf6..7c98fdcd 100644
--- a/test/compress/spreads.js
+++ b/test/compress/spreads.js
@@ -826,3 +826,23 @@ issue_4363: {
expect_stdout: "PASS"
node_version: ">=8"
}
+
+issue_4556: {
+ options = {
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ console.log(function() {
+ var a = "" + [ a++ ];
+ var b = [ ...a ];
+ }());
+ }
+ expect: {
+ console.log(function() {
+ var a;
+ }());
+ }
+ expect_stdout: "undefined"
+ node_version: ">=6"
+}