aboutsummaryrefslogtreecommitdiff
path: root/test/compress/conditionals.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/conditionals.js')
-rw-r--r--test/compress/conditionals.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js
index 27536b9f..3e7a0927 100644
--- a/test/compress/conditionals.js
+++ b/test/compress/conditionals.js
@@ -1489,3 +1489,29 @@ angularjs_chain: {
}
}
}
+
+issue_3576: {
+ options = {
+ conditionals: true,
+ evaluate: true,
+ pure_getters: "strict",
+ reduce_vars: true,
+ }
+ input: {
+ var c = "FAIL";
+ (function(a) {
+ (a = -1) ? (a && (a.a = 0)) : (a && (a.a = 0));
+ a && a[c = "PASS"]++;
+ })();
+ console.log(c);
+ }
+ expect: {
+ var c = "FAIL";
+ (function(a) {
+ a = -1, a, a.a = 0;
+ a, a[c = "PASS"]++;
+ })();
+ console.log(c);
+ }
+ expect_stdout: "PASS"
+}