mark AST_Var out of block scopes (#2700)
This commit is contained in:
@@ -284,6 +284,10 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
|
||||
}
|
||||
node.thedef = sym;
|
||||
node.reference(options);
|
||||
if (node.scope.is_block_scope()
|
||||
&& !(sym.orig[0] instanceof AST_SymbolBlockDeclaration)) {
|
||||
node.scope = node.scope.get_defun_scope();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// ensure mangling works if catch reuses a scope variable
|
||||
|
||||
Reference in New Issue
Block a user