diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-12-05 15:19:19 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-12-05 15:28:40 +0100 |
commit | a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1 (patch) | |
tree | 158b0d9041ef3a5a183ada111716b3a3e7d670d7 /test/files | |
parent | b828e323b824e9e25cba72436871651f1d754aad (diff) | |
download | scala-a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1.tar.gz scala-a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1.tar.bz2 scala-a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1.zip |
SI-5894 Don't emit static forwarders for macros.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t5894.scala | 17 |
1 files changed, 17 insertions, 0 deletions
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 + } + } +} |