blob: c6172613d5c5a87c983d09eab1de788a249e1910 (
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))
}
|