blob: f51cc7e699be0365aa9999ce28764e270f530da4 (
plain) (
tree)
|
|
object Test extends App {
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox
val tree = Select(Ident("Macros"), newTermName("foo"))
try cm.mkToolBox().runExpr(tree)
catch { case ex: Throwable => println(ex.getMessage) }
}
|