blob: 109e19e44a33e88c5ffcb1cd590f55084c4f8ac8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx)(x: c.Expr[Int]) = {
val x1 = c.Expr[Int](c.resetAllAttrs(x.tree))
c.literal(x1.value)
}
}
object Macros {
def foo(x: Int) = macro Impls.foo
}
|