can_replace = false;
var after = stop_after;
var if_hit = stop_if_hit;
- var rhs_fn = scan_rhs;
for (var i = 0; !abort && i < fn.body.length; i++) {
var stat = fn.body[i];
if (stat instanceof AST_Return) {
}
stat.transform(scanner);
}
- scan_rhs = rhs_fn;
stop_if_hit = if_hit;
stop_after = after;
can_replace = replace;
"1",
]
}
+
+issue_4001: {
+ options = {
+ collapse_vars: true,
+ ie8: true,
+ inline: true,
+ reduce_vars: true,
+ sequences: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ console.log(function(a) {
+ function f() {
+ return a;
+ var b;
+ }
+ var c = f();
+ (function g() {
+ c[42];
+ f;
+ })();
+ (function a() {});
+ }(42));
+ }
+ expect: {
+ function f() {
+ return a;
+ }
+ var a;
+ console.log((a = 42, void f()[42], void function a() {}));
+ }
+ expect_stdout: "undefined"
+}