diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-08-06 17:40:28 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-08-06 23:09:32 +0200 |
commit | 3c4f4865f6420f98a7ed502257bc65387951e26c (patch) | |
tree | 745fe6e869edba8aa64661af6d6d5f5832c85c39 /test | |
parent | 3aa221e28c3ae0381b876448e3174f0c527e9abc (diff) | |
download | scala-3c4f4865f6420f98a7ed502257bc65387951e26c.tar.gz scala-3c4f4865f6420f98a7ed502257bc65387951e26c.tar.bz2 scala-3c4f4865f6420f98a7ed502257bc65387951e26c.zip |
SI-6181 method mirrors now support by-name args
Arguments provided in by-name positions are now automatically wrapped
in Function0 instances by method mirrors.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t6181.check | 1 | ||||
-rw-r--r-- | test/files/run/t6181.scala | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t6181.check b/test/files/run/t6181.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/files/run/t6181.check @@ -0,0 +1 @@ +2
\ No newline at end of file diff --git a/test/files/run/t6181.scala b/test/files/run/t6181.scala new file mode 100644 index 0000000000..fb23eaff63 --- /dev/null +++ b/test/files/run/t6181.scala @@ -0,0 +1,8 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} + +object Test extends App { + class C { def test(x: => Int) = println(x) } + val mm = cm.reflect(new C).reflectMethod(typeOf[C].member(newTermName("test")).asMethod) + mm(2) +}
\ No newline at end of file |