blob: 8c609daa0e38cdfcdc37e6877ec23371caa665f3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import scala.reflect.makro.{Context => Ctx}
object Impls {
def myprintln(xs: Int*) = {
println(xs)
}
def foo(c: Ctx)(xs: c.Expr[Int]*) = {
import c.mirror._
val body = Apply(Select(Ident(newTermName("Impls")), newTermName("myprintln")), xs.map(_.tree).toList)
Expr[Unit](body)
}
}
|