summaryrefslogtreecommitdiff
path: root/test/files/run/macro-bodyexpandstoimpl/Impls_1.scala
blob: 5c5ec2c999101f6153b14986e3a856953959c7ca (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.mirror._
    val body = Select(Ident(newTermName("Impls")), newTermName("foo"))
    Expr[Int](body)
  }
}