aboutsummaryrefslogtreecommitdiff
path: root/test/compress/pure_getters.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/pure_getters.js')
-rw-r--r--test/compress/pure_getters.js34
1 files changed, 31 insertions, 3 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js
index bf6f73ef..d1dd07ee 100644
--- a/test/compress/pure_getters.js
+++ b/test/compress/pure_getters.js
@@ -1320,11 +1320,10 @@ issue_2878: {
issue_3427: {
options = {
- assignments: true,
- collapse_vars: true,
+ evaluate: true,
inline: true,
- passes: 2,
pure_getters: "strict",
+ reduce_vars: true,
sequences: true,
side_effects: true,
toplevel: true,
@@ -1536,3 +1535,32 @@ this_toString: {
expect_stdout: "[object Object]"
node_version: ">=4"
}
+
+issue_4803: {
+ options = {
+ hoist_vars: true,
+ pure_getters: "strict",
+ reduce_vars: true,
+ side_effects: true,
+ toplevel: true,
+ }
+ input: {
+ var o = {
+ get f() {
+ console.log("PASS");
+ },
+ } || 42;
+ for (var k in o)
+ o[k];
+ }
+ expect: {
+ var k, o = {
+ get f() {
+ console.log("PASS");
+ },
+ } || 42;
+ for (k in o)
+ o[k];
+ }
+ expect_stdout: "PASS"
+}