diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-09-16 13:34:57 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-10-10 13:25:33 +0200 |
commit | 18a69f7bd230bc06696e41be53a6735aa6e94ccc (patch) | |
tree | c21f0dc527194048b2195f2a1c4d98b1149cd3cf /src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala | |
parent | 12ac3054bf4288403babb172c125cdc98cfff012 (diff) | |
download | dotty-18a69f7bd230bc06696e41be53a6735aa6e94ccc.tar.gz dotty-18a69f7bd230bc06696e41be53a6735aa6e94ccc.tar.bz2 dotty-18a69f7bd230bc06696e41be53a6735aa6e94ccc.zip |
Rename Diagnostic to diagnostic.Message
Diffstat (limited to 'src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala')
-rw-r--r-- | src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala b/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala index 32554e6b6..1ef8b3447 100644 --- a/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala +++ b/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala @@ -5,6 +5,7 @@ package reporting import scala.collection.mutable import util.{SourcePosition, SourceFile} import core.Contexts.Context +import diagnostic.Message /** * This trait implements `isHidden` so that multiple messages per position @@ -17,12 +18,12 @@ trait UniqueMessagePositions extends Reporter { /** Logs a position and returns true if it was already logged. * @note Two positions are considered identical for logging if they have the same point. */ - override def isHidden(d: Diagnostic)(implicit ctx: Context): Boolean = - super.isHidden(d) || { - d.pos.exists && { - positions get (ctx.source, d.pos.point) match { - case Some(level) if level >= d.level => true - case _ => positions((ctx.source, d.pos.point)) = d.level; false + override def isHidden(m: Message)(implicit ctx: Context): Boolean = + super.isHidden(m) || { + m.pos.exists && { + positions get (ctx.source, m.pos.point) match { + case Some(level) if level >= m.level => true + case _ => positions((ctx.source, m.pos.point)) = m.level; false } } } |