summaryrefslogblamecommitdiff
path: root/test/files/run/macro-expand-recursive/Impls_1.scala
blob: 3def2d2fbe1dc3307298761ede848b7cceac8af0 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                            

              
                         
                       
                                                                                                                       
                      

   
                            
                       
                                                                 
                      
   
 
import scala.reflect.macros.blackbox.Context

object Impls {
  def foo(c: Context) = {
    import c.universe._
    val body = Apply(Select(Ident(definitions.PredefModule), TermName("println")), List(Literal(Constant("it works"))))
    c.Expr[Unit](body)
  }

  def fooFoo(c: Context) = {
    import c.universe._
    val body = Select(Ident(TermName("Macros")), TermName("foo"))
    c.Expr[Unit](body)
  }
}