aboutsummaryrefslogtreecommitdiff
path: root/test/compress/hoist_props.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/hoist_props.js')
-rw-r--r--test/compress/hoist_props.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/compress/hoist_props.js b/test/compress/hoist_props.js
index 563c7aab..cc7ef020 100644
--- a/test/compress/hoist_props.js
+++ b/test/compress/hoist_props.js
@@ -912,3 +912,31 @@ issue_3440: {
}
expect_stdout: "PASS"
}
+
+issue_3868: {
+ options = {
+ hoist_props: true,
+ passes: 2,
+ reduce_vars: true,
+ side_effects: true,
+ }
+ input: {
+ (function(t) {
+ t = {};
+ ({
+ get p() {},
+ q: (console.log("PASS"), +t),
+ }).r;
+ })();
+ }
+ expect: {
+ (function(t) {
+ t = {};
+ ({
+ get p() {},
+ q: (console.log("PASS"), +t),
+ }).r;
+ })();
+ }
+ expect_stdout: "PASS"
+}