blob: 603500b597c2ec2b13d26ac46f7573693939652e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import scala.reflect.macros.blackbox.Context
object Impls {
def foo(c: Context): c.Expr[Int] = {
import c.universe._
c.Expr(Literal(Constant("42")))
}
}
object Macros {
def foo: Int = macro Impls.foo
}
|