public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57dab1e
)
Don't warn for an unreferenced exception symbol in a catch block.
author
Arnavion
<arnavion@gmail.com>
Sat, 13 Sep 2014 04:01:19 +0000
(21:01 -0700)
committer
Arnavion
<arnavion@gmail.com>
Sat, 13 Sep 2014 04:01:19 +0000
(21:01 -0700)
lib/scope.js
patch
|
blob
|
history
diff --git
a/lib/scope.js
b/lib/scope.js
index
1ce17fa
..
6f29921
100644
(file)
--- 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",