aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/reporting/Reporter.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/reporting/Reporter.scala')
-rw-r--r--src/dotty/tools/dotc/reporting/Reporter.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dotty/tools/dotc/reporting/Reporter.scala b/src/dotty/tools/dotc/reporting/Reporter.scala
index eb9a10a59..401938859 100644
--- a/src/dotty/tools/dotc/reporting/Reporter.scala
+++ b/src/dotty/tools/dotc/reporting/Reporter.scala
@@ -13,7 +13,7 @@ import java.lang.System.currentTimeMillis
import core.Mode
import interfaces.Diagnostic.{ERROR, WARNING, INFO}
import dotty.tools.dotc.core.Symbols.Symbol
-import ErrorExplanations._
+import ErrorMessages._
object Reporter {
class Error(msgFn: => String, pos: SourcePosition) extends Diagnostic(msgFn, pos, ERROR)
@@ -96,10 +96,10 @@ trait Reporting { this: Context =>
def warning(msg: => String, pos: SourcePosition = NoSourcePosition): Unit =
reporter.report(new Warning(msg, pos))
- def explainWarning(expl: => Explanation, pos: SourcePosition = NoSourcePosition): Unit = {
- warning(expl.msg, pos)
- if (this.shouldExplain(expl))
- reporter.report(new Info(expl.explanation, NoSourcePosition))
+ def explainWarning(err: => ErrorMessage, pos: SourcePosition = NoSourcePosition): Unit = {
+ warning(err.msg, pos)
+ if (this.shouldExplain(err))
+ reporter.report(new Info(err.explanation, NoSourcePosition))
}
def strictWarning(msg: => String, pos: SourcePosition = NoSourcePosition): Unit =
@@ -111,10 +111,10 @@ trait Reporting { this: Context =>
reporter.report(new Error(msg, pos))
}
- def explainError(expl: => Explanation, pos: SourcePosition = NoSourcePosition): Unit = {
- error(expl.msg, pos)
- if (this.shouldExplain(expl))
- reporter.report(new Info(expl.explanation, NoSourcePosition))
+ def explainError(err: => ErrorMessage, pos: SourcePosition = NoSourcePosition): Unit = {
+ error(err.msg, pos)
+ if (this.shouldExplain(err))
+ reporter.report(new Info(err.explanation, NoSourcePosition))
}
def errorOrMigrationWarning(msg: => String, pos: SourcePosition = NoSourcePosition): Unit =