blob: 882867fcabe2e728c8fb9b6595f5489eba82f96d (
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): c.Expr[Int] = {
import c.mirror._
Literal(Constant("42"))
}
}
object Macros {
def foo: Int = macro Impls.foo
}
|