aboutsummary
aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 735688ea..4af4945f 100644
--- a/test/compress/reduce_vars.js
+++ b/test/compress/reduce_vars.js
@@ -7696,3 +7696,32 @@ issue_5048: {
}
expect_stdout: "undefined"
}
+
+issue_5050: {
+ options = {
+ evaluate: true,
+ reduce_vars: true,
+ toplevel: true,
+ }
+ input: {
+ function f() {
+ console.log(a);
+ }
+ this;
+ var a = 1;
+ f(console.log(2), f(), a = 3);
+ }
+ expect: {
+ function f() {
+ console.log(a);
+ }
+ this;
+ var a = 1;
+ f(console.log(2), f(), a = 3);
+ }
+ expect_stdout: [
+ "2",
+ "1",
+ "3",
+ ]
+}