diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-10 12:20:27 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-10 12:20:27 -0800 |
commit | c702483d43d6805e4e1591fe307ddceb1768d64a (patch) | |
tree | c8710a357c2a579b3859a640dc5767065a3d9409 /test/files | |
parent | 84eff4d144e1523f1a51ffca77eb983a29eccd72 (diff) | |
parent | a23cc20ed5d3795584cb9ed74c0cd4bda25c2df1 (diff) | |
download | scala-c702483d43d6805e4e1591fe307ddceb1768d64a.tar.gz scala-c702483d43d6805e4e1591fe307ddceb1768d64a.tar.bz2 scala-c702483d43d6805e4e1591fe307ddceb1768d64a.zip |
Merge pull request #1713 from retronym/ticket/5894
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 + } + } +} |