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.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js
index 58920411..6adc6168 100644
--- a/test/compress/pure_getters.js
+++ b/test/compress/pure_getters.js
@@ -248,6 +248,35 @@ issue_2110_2: {
expect_stdout: "function"
}
+issue_2110_3: {
+ options = {
+ collapse_vars: true,
+ pure_getters: "strict",
+ reduce_vars: true,
+ }
+ input: {
+ function g() {
+ return this;
+ }
+ console.log(typeof function() {
+ function f() {}
+ f.g = g;
+ return f.g();
+ }());
+ }
+ expect: {
+ function g() {
+ return this;
+ }
+ console.log(typeof function() {
+ function f() {}
+ f.g = g;
+ return f.g();
+ }());
+ }
+ expect_stdout: "function"
+}
+
set_immutable_1: {
options = {
collapse_vars: true,