blob: 28ec1ace6703333f8f981d1f1da1b7dd5cb4c5e9 (
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]) = c.literal(x.value)
}
object Macros {
def foo(x: Int) = macro Impls.foo
}
|