diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-06-14 00:38:30 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-04 15:49:06 +0200 |
commit | 62c8f90f3105b8f19a9f29f104ff232438372c73 (patch) | |
tree | 0540ae1ba8aece6fdaffd0210719c979c36d02b3 /src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala | |
parent | 98216be3f3e546fc320ab5182ac5c129707db1ce (diff) | |
download | scala-62c8f90f3105b8f19a9f29f104ff232438372c73.tar.gz scala-62c8f90f3105b8f19a9f29f104ff232438372c73.tar.bz2 scala-62c8f90f3105b8f19a9f29f104ff232438372c73.zip |
Uniformly route reporting through reporter.
Sharpen interfaces, reduce footprint of Reporting trait.
Ideally, all reporting should indirect through reporter,
and the `Reporting` trait itself should be restricted to
a single method that retrieves the current `reporter`.
Pull up some more reporting to reflect.internal.
Would like to do more, but need to move partest to the
reflect.internal interface first.
(Its `errorCount` relies on `ERROR.count` in `tools.nsc.Reporter`.)
Diffstat (limited to 'src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala b/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala index 16d432438a..6c592ead0d 100644 --- a/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala +++ b/src/compiler/scala/tools/nsc/reporters/AbstractReporter.scala @@ -62,12 +62,13 @@ abstract class AbstractReporter extends Reporter { */ private def testAndLog(pos: Position, severity: Severity, msg: String): Boolean = pos != null && pos.isDefined && { - val fpos = pos.focus + val fpos = pos.focus val suppress = positions(fpos) match { - case ERROR => true // already error at position - case highest if highest > severity => true // already message higher than present severity - case `severity` => messages(fpos) contains msg // already issued this exact message - case _ => false // good to go + case ERROR => true // already error at position + case highest + if highest.id > severity.id => true // already message higher than present severity + case `severity` => messages(fpos) contains msg // already issued this exact message + case _ => false // good to go } suppress || { |