diff options
Diffstat (limited to 'test/files/run/t6323b.scala')
-rw-r--r-- | test/files/run/t6323b.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/t6323b.scala b/test/files/run/t6323b.scala new file mode 100644 index 0000000000..f530ac3ecc --- /dev/null +++ b/test/files/run/t6323b.scala @@ -0,0 +1,21 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => m} +import scala.reflect.runtime.{universe => u} + +object Test extends App { + locally { + try { + case class Test(a:String,b:List[Int]) + + val lookAtMe = m.reflect(Test("a",List(5))) + val value = u.weakTypeOf[Test] + val members = value.members + val member = value.members.filter(_.name.encoded == "a") + val aAccessor = lookAtMe.reflectMethod(member.head.asMethod) + val thisShouldBeA = aAccessor.apply() + println(thisShouldBeA) + } catch { + case ScalaReflectionException(msg) => println(msg) + } + } +}
\ No newline at end of file |