summaryrefslogblamecommitdiff
path: root/test/files/run/toolbox_silent_reporter.scala
blob: 915734e6ad5b3a104fdb0210c983ebe782aee389 (plain) (tree)
1
2
3
4
5
6
7



                                                  

                         
                                                      






                                   
         
                                                      
                                            

                                                      
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox

object Test extends App {
  val toolbox = cm.mkToolBox(options = "-deprecation")
  toolbox.runExpr(reify{
    object Utils {
      @deprecated("test", "2.10.0")
      def foo { println("hello") }
    }

    Utils.foo
  }.tree)
  println("============compiler messages============")
  toolbox.frontEnd.infos.foreach(println(_))
  println("=========================================")
}