blob: 2a55437273bda437a6e56a3a1660b24c424f9418 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox
object Test extends App {
val tb = cm.mkToolBox()
val tree = Select(This(cm.staticPackage("scala").moduleClass), TermName("Predef"))
val ttree = tb.typeCheck(tree)
val rttree = tb.resetAllAttrs(ttree)
println(tb.eval(rttree) == Predef)
}
|