summaryrefslogtreecommitdiff
path: root/test/files/run/macro-declared-in-default-param/Impls_1.scala
blob: 5e7351e954df922033960172637582a509ae7a60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import scala.reflect.makro.{Context => Ctx}

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