fix detecting symbols in use
authorMihai Bazon <mihai@bazon.net>
Tue, 9 Oct 2012 10:13:55 +0000 (13:13 +0300)
committerMihai Bazon <mihai@bazon.net>
Tue, 9 Oct 2012 10:13:55 +0000 (13:13 +0300)
lib/compress.js

index 3d55ecc..6709d8e 100644 (file)
@@ -841,7 +841,7 @@ merge(Compressor.prototype, {
                         decl.init.forEach(function(init){
                             var tw = new TreeWalker(function(node){
                                 if (node instanceof AST_SymbolRef
-                                    && node.definition().scope.$self === self.$self) {
+                                    && !(node instanceof AST_LabelRef)) {
                                     push_uniq(in_use, node.definition());
                                 }
                             });