aboutsummaryrefslogtreecommitdiff
path: root/test/compress/reduce_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r--test/compress/reduce_vars.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js
index a03bc1c8..681dafd3 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -2954,3 +2954,32 @@ const_expr_2: {
}
expect_stdout: "2 2"
}
+
+escaped_prop: {
+ options = {
+ collapse_vars: true,
+ evaluate: true,
+ inline: true,
+ pure_getters: "strict",
+ reduce_vars: true,
+ side_effects: true,
+ toplevel: true,
+ unsafe: true,
+ unused: true,
+ }
+ input: {
+ var obj = { o: { a: 1 } };
+ (function(o) {
+ o.a++;
+ })(obj.o);
+ (function(o) {
+ console.log(o.a);
+ })(obj.o);
+ }
+ expect: {
+ var obj = { o: { a: 1 } };
+ obj.o.a++;
+ console.log(obj.o.a);
+ }
+ expect_stdout: "2"
+}