From 760856b25044874e2d2479390fc1c163189ac0b4 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 26 Sep 2012 11:46:38 -0700 Subject: Move -Xdead-code out of the standard -Xlint. It has become extremely noisy for reasons not yet known. --- src/compiler/scala/tools/nsc/settings/Warnings.scala | 3 ++- src/compiler/scala/tools/nsc/transform/Erasure.scala | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3