diff options
author | Arnavion <arnavion@gmail.com> | 2014-09-12 21:01:19 -0700 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2014-09-12 21:01:19 -0700 |
commit | 7be680d3f8fe0b17d01c8e4aea5a95dcb97b43c8 (patch) | |
tree | 2a662be4fcf301bd5a96be8bb672a35f6cd79345 /lib/scope.js | |
parent | 57dab1e1db7ed542ce9ace7caa3141130edffe12 (diff) | |
download | tracifyjs-7be680d3f8fe0b17d01c8e4aea5a95dcb97b43c8.tar.gz tracifyjs-7be680d3f8fe0b17d01c8e4aea5a95dcb97b43c8.zip |
Don't warn for an unreferenced exception symbol in a catch block.
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 1 |
1 files changed, 1 insertions, 0 deletions
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", |