summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/Reporting.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/Reporting.scala b/src/compiler/scala/tools/nsc/Reporting.scala
index 6ae5ec3c1d..c9782de7c8 100644
--- a/src/compiler/scala/tools/nsc/Reporting.scala
+++ b/src/compiler/scala/tools/nsc/Reporting.scala
@@ -32,17 +32,14 @@ trait Reporting extends scala.reflect.internal.Reporting { self: ast.Positions w
def warn(pos: Position, msg: String) =
if (option) reporter.warning(pos, msg)
else if (!(warnings contains pos)) warnings += ((pos, msg))
- def summarize() = {
- def turnedOff = option.isSetByUser && !option
- def moreInfos = option.isDefault || settings.fatalWarnings
- if (warnings.nonEmpty && !turnedOff && moreInfos) {
+ def summarize() =
+ if (warnings.nonEmpty && (option.isDefault || option)) {
val numWarnings = warnings.size
val warningVerb = if (numWarnings == 1) "was" else "were"
val warningCount = countElementsAsString(numWarnings, s"$what warning")
reporter.warning(NoPosition, s"there $warningVerb $warningCount; re-run with ${option.name} for details")
}
- }
}
// This change broke sbt; I gave it the thrilling name of uncheckedWarnings0 so