Skip to content

Commit 7f2f283

Browse files
committed
Make Reporter.doReport public
As reporter.report could actually not report dues to mode flag, we need a way to enforce printing.
1 parent 65b0c37 commit 7f2f283

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/dotty/tools/dotc/reporting/Reporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ trait Reporting { this: Context =>
182182
abstract class Reporter {
183183

184184
/** Report a diagnostic */
185-
protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit
185+
def doReport(d: Diagnostic)(implicit ctx: Context): Unit
186186

187187
/** Whether very long lines can be truncated. This exists so important
188188
* debugging information (like printing the classpath) is not rendered

src/dotty/tools/dotc/reporting/StoreReporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class StoreReporter extends Reporter {
1414

1515
private var infos: mutable.ListBuffer[Diagnostic] = null
1616

17-
protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit = {
17+
def doReport(d: Diagnostic)(implicit ctx: Context): Unit = {
1818
typr.println(s">>>> StoredError: ${d.msg}") // !!! DEBUG
1919
if (infos == null) infos = new mutable.ListBuffer
2020
infos += d

src/dotty/tools/dotc/reporting/ThrowingReporter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Reporter._
1111
* info to the underlying reporter.
1212
*/
1313
class ThrowingReporter(reportInfo: Reporter) extends Reporter {
14-
protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match {
14+
def doReport(d: Diagnostic)(implicit ctx: Context): Unit = d match {
1515
case _: Error => throw d
1616
case _ => reportInfo.report(d)
1717
}

0 commit comments

Comments
 (0)