From a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 5 Dec 2012 15:19:19 +0100 Subject: SI-5894 Don't emit static forwarders for macros. --- test/files/run/t5894.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/files/run/t5894.scala (limited to 'test/files') diff --git a/test/files/run/t5894.scala b/test/files/run/t5894.scala new file mode 100644 index 0000000000..abeec32365 --- /dev/null +++ b/test/files/run/t5894.scala @@ -0,0 +1,17 @@ +import language.experimental.macros + +class Test + +object Test { + def foo = macro fooImpl + def fooImpl(c: reflect.macros.Context) = c.literalUnit + + def main(args: Array[String]) { + try { + val method = classOf[Test].getMethod("foo") + sys.error("Static forwarder generated for macro: " + method) + } catch { + case _: NoSuchMethodException => // okay + } + } +} -- cgit v1.2.3