aboutsummaryrefslogtreecommitdiff
path: root/test/compress/properties.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-04-29 17:23:00 +0800
committerGitHub <noreply@github.com>2019-04-29 17:23:00 +0800
commitc37a8e927e5fdd2276c658586003710e119293c8 (patch)
treefa94faa28fe078006df3cdd44346c59358f41c00 /test/compress/properties.js
parent413bbe0480d28d18833fbc3ebdb68fa74138d758 (diff)
downloadtracifyjs-c37a8e927e5fdd2276c658586003710e119293c8.tar.gz
tracifyjs-c37a8e927e5fdd2276c658586003710e119293c8.zip
fix corner case in `properties` (#3390)
fixes #3389
Diffstat (limited to 'test/compress/properties.js')
-rw-r--r--test/compress/properties.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js
index 3a78d626..a70ab7d8 100644
--- a/test/compress/properties.js
+++ b/test/compress/properties.js
@@ -1862,3 +1862,29 @@ join_expr: {
}
expect_stdout: "PASS"
}
+
+issue_3389: {
+ options = {
+ evaluate: true,
+ properties: true,
+ reduce_vars: true,
+ unsafe: true,
+ }
+ input: {
+ (function() {
+ var a = "PASS";
+ if (delete b)
+ b = a[null] = 42;
+ console.log(a);
+ })();
+ }
+ expect: {
+ (function() {
+ var a = "PASS";
+ if (delete b)
+ b = a.null = 42;
+ console.log(a);
+ })();
+ }
+ expect_stdout: "PASS"
+}