diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-26 11:46:38 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-26 11:46:38 -0700 |
commit | 760856b25044874e2d2479390fc1c163189ac0b4 (patch) | |
tree | eab1aaf65c0b5f5c02b80fe71bb3c913c6bdbcec /src/compiler | |
parent | c1d6f39a4c38d600b761e8df03d03f59c8acd841 (diff) | |
download | scala-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/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/settings/Warnings.scala | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 2 |
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) |