blob: 828ccf34e256473e3f5f7d23f6d517fc7e58d852 (
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._
Expr(Literal(Constant("42")))
}
}
object Macros {
def foo: Int = macro Impls.foo
}
|