blob: dc7d42d23ec1ccf0ec8527b2f70db09fcd12b3a5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
import c.mirror._
val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1))))
Expr[Int](body)
}
}
|