if (node instanceof AST_SymbolCatch) {
var scope = node.thedef.defun;
if (scope.name instanceof AST_SymbolLambda && scope.name.name == node.name) {
- scope = scope.parent_scope;
+ scope = scope.parent_scope.resolve();
}
redefine(node, scope);
return true;
if (node instanceof AST_SymbolLambda) {
var def = node.thedef;
redefine(node, node.scope.parent_scope.resolve());
- if (def.init) node.thedef.init = def.init;
+ if (typeof node.thedef.init !== "undefined") {
+ node.thedef.init = false;
+ } else if (def.init) {
+ node.thedef.init = def.init;
+ }
return true;
}
}));
}
expect_stdout: "number number"
}
+
+issue_3486: {
+ options = {
+ conditionals: true,
+ ie8: false,
+ reduce_vars: true,
+ }
+ input: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect_stdout: "PASS"
+}
+
+issue_3486_ie8: {
+ options = {
+ conditionals: true,
+ ie8: true,
+ reduce_vars: true,
+ }
+ input: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect: {
+ (function a() {
+ (function a(a) {
+ console.log(a ? "FAIL" : "PASS");
+ })();
+ })();
+ }
+ expect_stdout: "PASS"
+}