aboutsummaryrefslogblamecommitdiff
path: root/src/dotty/tools/dotc/reporting/StoreReporter.scala
blob: 54daf2b6b317dd0d99bfed7c9c27fb4ae253767c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11




                            

                          



                                                            
                                                         
 
                                                
 




                                                                      
 
 
package dotty.tools
package dotc
package reporting

import core.Contexts.Context
import collection.mutable
import Reporter.Diagnostic

/**
 * This class implements a Reporter that stores all messages
 */
class StoreReporter(ctx: Context) extends Reporter(ctx) {

  val infos = new mutable.ListBuffer[Diagnostic]

  protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit =
    infos += d

  def replay(implicit ctx: Context) =
    infos foreach ctx.reporter.report

}