From 7f2f283a1dff4e2dc03ee5aefcdf2feeb0462aa1 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Wed, 1 Jul 2015 15:47:09 +0200 Subject: Make Reporter.doReport public As reporter.report could actually not report dues to mode flag, we need a way to enforce printing. --- src/dotty/tools/dotc/reporting/Reporter.scala | 2 +- src/dotty/tools/dotc/reporting/StoreReporter.scala | 2 +- src/dotty/tools/dotc/reporting/ThrowingReporter.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/reporting') diff --git a/src/dotty/tools/dotc/reporting/Reporter.scala b/src/dotty/tools/dotc/reporting/Reporter.scala index 7c5bab673..7adeeac1c 100644 --- a/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/src/dotty/tools/dotc/reporting/Reporter.scala @@ -182,7 +182,7 @@ trait Reporting { this: Context => abstract class Reporter { /** Report a diagnostic */ - protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit + def doReport(d: Diagnostic)(implicit ctx: Context): Unit /** Whether very long lines can be truncated. This exists so important * debugging information (like printing the classpath) is not rendered diff --git a/src/dotty/tools/dotc/reporting/StoreReporter.scala b/src/dotty/tools/dotc/reporting/StoreReporter.scala index 2864c01f8..51d3df110 100644 --- a/src/dotty/tools/dotc/reporting/StoreReporter.scala +++ b/src/dotty/tools/dotc/reporting/StoreReporter.scala @@ -14,7 +14,7 @@ class StoreReporter extends Reporter { private var infos: mutable.ListBuffer[Diagnostic] = null - protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit = { + def doReport(d: Diagnostic)(implicit ctx: Context): Unit = { typr.println(s">>>> StoredError: ${d.msg}") // !!! DEBUG if (infos == null) infos = new mutable.ListBuffer infos += d diff --git a/src/dotty/tools/dotc/reporting/ThrowingReporter.scala b/src/dotty/tools/dotc/reporting/ThrowingReporter.scala index 358b8d249..64350fc0e 100644 --- a/src/dotty/tools/dotc/reporting/ThrowingReporter.scala +++ b/src/dotty/tools/dotc/reporting/ThrowingReporter.scala @@ -11,7 +11,7 @@ import Reporter._ * info to the underlying reporter. */ class ThrowingReporter(reportInfo: Reporter) extends Reporter { - protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match { + def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match { case _: Error => throw d case _ => reportInfo.report(d) } -- cgit v1.2.3