blob: 7de1e59cc72e999b03bb989dc5c3557ff295d4f5 (
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)(x: c.Expr[Int]) = x
def refToFoo(dummy: Int) = macro refToFoo_impl
def refToFoo_impl(c: Ctx)(dummy: c.Expr[Int]) = {
import c.universe._
val body = Select(Ident(newTermName("Impls")), newTermName("foo"))
c.Expr[Int](body)
}
}
|