Merge branch 'master' into harmony-v2.8.13

This commit is contained in:
alexlamsl
2017-03-18 02:52:45 +08:00
19 changed files with 689 additions and 246 deletions

View File

@@ -279,7 +279,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
if (node instanceof AST_SymbolCatch) {
var name = node.name;
var refs = node.thedef.references;
var scope = node.thedef.scope.parent_scope;
var scope = node.thedef.scope.parent_scope.parent_scope;
var def = scope.find_variable(name) || self.globals.get(name) || scope.def_variable(node);
refs.forEach(function(ref) {
ref.thedef = def;