summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-01-20 00:18:38 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-01-20 00:18:38 +0100
commit8f498847020c5623559fa42d5d23e44fb74c8d22 (patch)
tree88442f82f585423b131787d9fb8b2bfa3133bf45 /src
parent6f72ed85c3882d2a8c824a41e6e42d7f33b8d1d6 (diff)
downloadscala-8f498847020c5623559fa42d5d23e44fb74c8d22.tar.gz
scala-8f498847020c5623559fa42d5d23e44fb74c8d22.tar.bz2
scala-8f498847020c5623559fa42d5d23e44fb74c8d22.zip
SI-6994 Avoid spurious promiscuous catch warning
It was being issued upon re-typechecking of a transformed tree. Now we disable the warning post-typer.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index cbcddba487..5ad6c6bd73 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -5367,7 +5367,7 @@ trait Typers extends Modes with Adaptations with Tags {
var block1 = typed(tree.block, pt)
var catches1 = typedCases(tree.catches, ThrowableClass.tpe, pt)
- for (cdef <- catches1 if cdef.guard.isEmpty) {
+ for (cdef <- catches1 if !isPastTyper && cdef.guard.isEmpty) {
def warn(name: Name) = context.warning(cdef.pat.pos, s"This catches all Throwables. If this is really intended, use `case ${name.decoded} : Throwable` to clear this warning.")
def unbound(t: Tree) = t.symbol == null || t.symbol == NoSymbol
cdef.pat match {