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


                     
                       
                                                                                                                          
                      


                        
                       
                                                                       
                      
   
 
import scala.reflect.macros.{Context => Ctx}

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

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