summaryrefslogtreecommitdiff
path: root/test/files/run/reflection-simple.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-05-02 01:18:27 -0700
committerPaul Phillips <paulp@improving.org>2012-05-02 01:27:46 -0700
commit90d2bee45b25844f809f8c5300aefcb1bfe9e336 (patch)
tree6537e84683dae3f64c17f17bdcfe7cc177fd1a46 /test/files/run/reflection-simple.scala
parentb27abca41a2503747b3aeeecf8b8cb355159265f (diff)
downloadscala-90d2bee45b25844f809f8c5300aefcb1bfe9e336.tar.gz
scala-90d2bee45b25844f809f8c5300aefcb1bfe9e336.tar.bz2
scala-90d2bee45b25844f809f8c5300aefcb1bfe9e336.zip
Fixs for reflection and getSimpleName.
Since getSimpleName will be crashing us indefinitely, took the expedient route and wrapped the call.
Diffstat (limited to 'test/files/run/reflection-simple.scala')
-rw-r--r--test/files/run/reflection-simple.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/reflection-simple.scala b/test/files/run/reflection-simple.scala
new file mode 100644
index 0000000000..fb3feec3cb
--- /dev/null
+++ b/test/files/run/reflection-simple.scala
@@ -0,0 +1,11 @@
+// a.scala
+// Wed May 2 01:01:22 PDT 2012
+
+object Test {
+ def main(args: Array[String]) {
+ System.out.println("Running")
+ case class Foo(a: Int, b: Int, c: Int)
+ val props = reflect.mirror.classToType(classOf[Foo]).members.filter(_.isTerm).map(_.toString)
+ props.toList.sorted foreach System.out.println
+ }
+}