aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-10-18 17:09:43 +0800
committerGitHub <noreply@github.com>2019-10-18 17:09:43 +0800
commitcd072317d08cc0d1a97f8bd295ee1138d608ae84 (patch)
treead362037ff6ce39bdd2473a604654dadbf21ec29 /test
parent0785a15aceaee3f4a31d9693a4230cbf0477ea81 (diff)
downloadtracifyjs-cd072317d08cc0d1a97f8bd295ee1138d608ae84.tar.gz
tracifyjs-cd072317d08cc0d1a97f8bd295ee1138d608ae84.zip
fix corner case in `unused` (#3496)
fixes #3495
Diffstat (limited to 'test')
-rw-r--r--test/compress/drop-unused.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js
index 6ed193e9..ea7ee02f 100644
--- a/test/compress/drop-unused.js
+++ b/test/compress/drop-unused.js
@@ -2062,3 +2062,22 @@ issue_3427_2: {
}
expect_stdout: "PASS"
}
+
+issue_3495: {
+ options = {
+ dead_code: true,
+ pure_getters: "strict",
+ side_effects: true,
+ unused: true,
+ }
+ input: {
+ console.log(function f() {
+ f = 0;
+ var a = f.p;
+ }());
+ }
+ expect: {
+ console.log(void 0);
+ }
+ expect_stdout: "undefined"
+}