From 7be680d3f8fe0b17d01c8e4aea5a95dcb97b43c8 Mon Sep 17 00:00:00 2001 From: Arnavion Date: Fri, 12 Sep 2014 21:01:19 -0700 Subject: Don't warn for an unreferenced exception symbol in a catch block. --- lib/scope.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/scope.js b/lib/scope.js index 1ce17fa6..6f29921f 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -532,6 +532,7 @@ AST_Toplevel.DEFMETHOD("scope_warnings", function(options){ } if (options.unreferenced && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) + && !(node instanceof AST_SymbolCatch) && node.unreferenced()) { AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { type: node instanceof AST_Label ? "Label" : "Symbol", -- cgit v1.2.3