aboutsummaryrefslogtreecommitdiff
path: root/test/compress/collapse_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r--test/compress/collapse_vars.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js
index f56face6..948389b1 100644
--- a/test/compress/collapse_vars.js
+++ b/test/compress/collapse_vars.js
@@ -4191,6 +4191,31 @@ return_3: {
expect_stdout: "0"
}
+return_4: {
+ options = {
+ collapse_vars: true,
+ }
+ input: {
+ var a = "FAIL";
+ (function(b) {
+ a = "PASS";
+ return;
+ b(a);
+ })();
+ console.log(a);
+ }
+ expect: {
+ var a = "FAIL";
+ (function(b) {
+ a = "PASS";
+ return;
+ b(a);
+ })();
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+}
+
issue_2858: {
options = {
collapse_vars: true,