blob: 15f559d6051b6017397a910ab1c0d12106128473 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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.eval(reify{
object Utils {
@deprecated("test", "2.10.0")
def foo { println("hello") }
}
Utils.foo
}.tree)
println("============compiler messages============")
toolbox.frontEnd.infos.foreach(println(_))
println("=========================================")
}
|