aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t5894.scala
blob: c67a46def505be2e22c73c8c8185e5969d230449 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import scala.reflect.macros.blackbox.Context
import scala.language.experimental.macros

class Test

object Test {
  def foo: Unit = macro fooImpl
  def fooImpl(c: Context) = { import c.universe._; c.Expr[Unit](q"()") }

  def main(args: Array[String]): Unit = {
    try {
      val method = classOf[Test].getMethod("foo")
      sys.error("Static forwarder generated for macro: " + method)
    } catch {
      case _: NoSuchMethodException => // okay
    }
  }
}