summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-29 21:42:25 +0000
committerPaul Phillips <paulp@improving.org>2011-07-29 21:42:25 +0000
commit9bdc1a0b6deb5bf8a056af0253b25fcf5d92c7f7 (patch)
tree9625ceb6358baf68b84eae5e1dc6fa74d267e425 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent902c61f397069b9918f1854b8bf95a50b52c08fc (diff)
downloadscala-9bdc1a0b6deb5bf8a056af0253b25fcf5d92c7f7.tar.gz
scala-9bdc1a0b6deb5bf8a056af0253b25fcf5d92c7f7.tar.bz2
scala-9bdc1a0b6deb5bf8a056af0253b25fcf5d92c7f7.zip
Following up on things that -Xlint told me, som...
Following up on things that -Xlint told me, sometimes because Mr. Linty was being sensible and other times just to shut him up so we can hear better in the future. - made xml.Equality public because it occurs in public method signatures - made some actor classes with inaccessible-unoverridable methods final - eliminated a bunch of "dead code follows" warnings by deleting the dead code which really did follow - improved the reliability of warnings about inaccessible types For the changes in actors, review by phaller.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 4125ab0285..23482eb609 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2118,6 +2118,8 @@ trait Typers extends Modes with Adaptations {
} else {
val localTyper = if (inBlock || (stat.isDef && !stat.isInstanceOf[LabelDef])) this
else newTyper(context.make(stat, exprOwner))
+ // XXX this creates a spurious dead code warning if an exception is thrown
+ // in a constructor, even if it is the only thing in the constructor.
val result = checkDead(localTyper.typed(stat, EXPRmode | BYVALmode, WildcardType))
if (treeInfo.isSelfOrSuperConstrCall(result)) {
context.inConstructorSuffix = true
@@ -2202,7 +2204,7 @@ trait Typers extends Modes with Adaptations {
}) ::: newStats.toList
}
}
- val result = stats mapConserve (typedStat)
+ val result = stats mapConserve typedStat
if (phase.erasedTypes) result
else checkNoDoubleDefsAndAddSynthetics(result)
}