seems cleaner if AST_Label doesn't inherit from AST_SymbolDeclaration

This commit is contained in:
Mihai Bazon
2012-10-10 11:37:51 +03:00
parent f26f3b44bc
commit dacce1b1fa
2 changed files with 2 additions and 2 deletions

View File

@@ -533,7 +533,7 @@ AST_Toplevel.DEFMETHOD("scope_warnings", function(options){
AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start);
}
if (options.unreferenced
&& node instanceof AST_SymbolDeclaration
&& (node instanceof AST_SymbolDeclaration || node instanceof AST_Label)
&& node.unreferenced()) {
AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", {
type: node instanceof AST_Label ? "Label" : "Symbol",