From 6b14f7c224852a8b7b7cb837935bc300482d4d46 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Fri, 4 Jan 2013 14:17:33 +0200 Subject: [PATCH] Fix handling of labels in nested scopes --- lib/scope.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/scope.js b/lib/scope.js index 34ca5fb3..7bcd372f 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -84,9 +84,12 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){ if (node instanceof AST_Scope) { node.init_scope_vars(nesting); var save_scope = node.parent_scope = scope; + var save_labels = labels; ++nesting; scope = node; + labels = new Dictionary(); descend(); + labels = save_labels; scope = save_scope; --nesting; return true; // don't descend again in TreeWalker -- 2.34.1