Don't warn for an unreferenced exception symbol in a catch block.

This commit is contained in:
Arnavion
2014-09-12 21:01:19 -07:00
parent 57dab1e1db
commit 7be680d3f8

View File

@@ -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",