aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-11-18 17:11:28 +0000
committerGitHub <noreply@github.com>2020-11-19 01:11:28 +0800
commitfd6544b34011a30bd869d2447b744fe51d0d741f (patch)
tree00302bd48b62f43057e1e4f0244727d188113112 /test
parentf6a83f794456c65ba927c0ccf55ff88c5c003a66 (diff)
downloadtracifyjs-fd6544b34011a30bd869d2447b744fe51d0d741f.tar.gz
tracifyjs-fd6544b34011a30bd869d2447b744fe51d0d741f.zip
fix corner case `reduce_vars` (#4300)
fixes #4297
Diffstat (limited to 'test')
-rw-r--r--test/compress/destructured.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js
index cebb70ae..8671d87b 100644
--- a/test/compress/destructured.js
+++ b/test/compress/destructured.js
@@ -1503,6 +1503,25 @@ issue_4294: {
node_version: ">=6"
}
+issue_4297: {
+ options = {
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ console.log(typeof function(a) {
+ return { a } = a;
+ }(function() {}));
+ }
+ expect: {
+ console.log(typeof function(a) {
+ return { a } = a;
+ }(function() {}));
+ }
+ expect_stdout: "function"
+ node_version: ">=6"
+}
+
issue_4298: {
options = {
merge_vars: true,