summaryrefslogtreecommitdiff
path: root/test/files/run/t5894.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-12-05 15:19:19 +0100
committerJason Zaugg <jzaugg@gmail.com>2012-12-05 15:28:40 +0100
commita23cc20ed5d3795584cb9ed74c0cd4bda25c2df1 (patch)
tree158b0d9041ef3a5a183ada111716b3a3e7d670d7 /test/files/run/t5894.scala
parentb828e323b824e9e25cba72436871651f1d754aad (diff)
downloadscala-a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1.tar.gz
scala-a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1.tar.bz2
scala-a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1.zip
SI-5894 Don't emit static forwarders for macros.
Diffstat (limited to 'test/files/run/t5894.scala')
-rw-r--r--test/files/run/t5894.scala17
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
+ }
+ }
+}