aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-12 01:12:30 +0000
committerGitHub <noreply@github.com>2021-01-12 09:12:30 +0800
commitc12486bab4e445144968635e16b96943ed98b8c1 (patch)
tree48e5328203affc5ffe4f130622448d86df4b70aa /test/compress
parent52e94a072350b9d40ff11e8799b7550ce216cd45 (diff)
downloadtracifyjs-c12486bab4e445144968635e16b96943ed98b8c1.tar.gz
tracifyjs-c12486bab4e445144968635e16b96943ed98b8c1.zip
fix corner case in `rests` (#4539)
fixes #4538
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/rests.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/rests.js b/test/compress/rests.js
index f3c2af95..e322112c 100644
--- a/test/compress/rests.js
+++ b/test/compress/rests.js
@@ -525,3 +525,22 @@ issue_4525_2: {
expect_stdout: "PASS"
node_version: ">=6"
}
+
+issue_4538: {
+ options = {
+ rests: true,
+ unused: true,
+ }
+ input: {
+ console.log(typeof function f(...a) {
+ return a.p, f;
+ }()());
+ }
+ expect: {
+ console.log(typeof function f(...a) {
+ return a.p, f;
+ }()());
+ }
+ expect_stdout: "function"
+ node_version: ">=6"
+}