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