summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-26 11:46:38 -0700
committerPaul Phillips <paulp@improving.org>2012-09-26 11:46:38 -0700
commit760856b25044874e2d2479390fc1c163189ac0b4 (patch)
treeeab1aaf65c0b5f5c02b80fe71bb3c913c6bdbcec /src
parentc1d6f39a4c38d600b761e8df03d03f59c8acd841 (diff)
downloadscala-760856b25044874e2d2479390fc1c163189ac0b4.tar.gz
scala-760856b25044874e2d2479390fc1c163189ac0b4.tar.bz2
scala-760856b25044874e2d2479390fc1c163189ac0b4.zip
Move -Xdead-code out of the standard -Xlint.
It has become extremely noisy for reasons not yet known.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/settings/Warnings.scala3
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/Warnings.scala b/src/compiler/scala/tools/nsc/settings/Warnings.scala
index 16f8685a87..72284cc940 100644
--- a/src/compiler/scala/tools/nsc/settings/Warnings.scala
+++ b/src/compiler/scala/tools/nsc/settings/Warnings.scala
@@ -18,6 +18,7 @@ trait Warnings {
// These warnings are all so noisy as to be useless in their
// present form, but have the potential to offer useful info.
protected def allWarnings = lintWarnings ++ List(
+ warnDeadCode,
warnSelectNullable,
warnValueDiscard,
warnNumericWiden
@@ -25,7 +26,7 @@ trait Warnings {
// These warnings should be pretty quiet unless you're doing
// something inadvisable.
protected def lintWarnings = List(
- warnDeadCode,
+ // warnDeadCode,
warnInaccessible,
warnNullaryOverride,
warnNullaryUnit,
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 5d5e150662..3ac7dd2a8f 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -663,7 +663,7 @@ abstract class Erasure extends AddInterfaces
/** Generate a synthetic cast operation from tree.tpe to pt.
* @pre pt eq pt.normalize
*/
- private def cast(tree: Tree, pt: Type): Tree = {
+ private def cast(tree: Tree, pt: Type): Tree = logResult(s"cast($tree, $pt)") {
if (pt.typeSymbol == UnitClass) {
// See SI-4731 for one example of how this occurs.
log("Attempted to cast to Unit: " + tree)