aboutsummaryrefslogtreecommitdiff
path: root/test/compress/let.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/let.js')
-rw-r--r--test/compress/let.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/compress/let.js b/test/compress/let.js
index 90d99524..c59308c4 100644
--- a/test/compress/let.js
+++ b/test/compress/let.js
@@ -1506,3 +1506,43 @@ issue_4691: {
expect_stdout: "PASS"
node_version: ">=4"
}
+
+issue_4848: {
+ options = {
+ if_return: true,
+ }
+ input: {
+ "use strict";
+ function f(a) {
+ a(function() {
+ console.log(b);
+ });
+ if (!console)
+ return;
+ let b = "PASS";
+ }
+ var g;
+ f(function(h) {
+ g = h;
+ });
+ g();
+ }
+ expect: {
+ "use strict";
+ function f(a) {
+ a(function() {
+ console.log(b);
+ });
+ if (!console)
+ return;
+ let b = "PASS";
+ }
+ var g;
+ f(function(h) {
+ g = h;
+ });
+ g();
+ }
+ expect_stdout: "PASS"
+ node_version: ">=4"
+}