summaryrefslogblamecommitdiff
path: root/test/files/run/macro-invalidusage-partialapplication/Test_2.scala
blob: 64020b2aa9ada517159c034f502e2725e00cf7ff (plain) (tree)
1
2
3
4
5
6
7
8
                         


                                                    
                                                                                            
                                  

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