blob: 08e8bb163b0d9fffb77e65d866677be794f083fb (
plain) (
tree)
|
|
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 untyped = reify(new Object().getClass).tree
val typed = tb.typeCheck(untyped)
println(typed)
println(showRaw(typed.tpe))
}
|