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