summaryrefslogtreecommitdiff
path: root/test/files/pos/getClassType.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-06-24 13:16:03 +0000
committerPaul Phillips <paulp@improving.org>2011-06-24 13:16:03 +0000
commit438c7a4540fe2852f48a046a99b937187902afd7 (patch)
tree73c6789731f3664b713347fe7b434ad30c971b99 /test/files/pos/getClassType.scala
parent034489b50158756b57091a04830d94160975bddb (diff)
downloadscala-438c7a4540fe2852f48a046a99b937187902afd7.tar.gz
scala-438c7a4540fe2852f48a046a99b937187902afd7.tar.bz2
scala-438c7a4540fe2852f48a046a99b937187902afd7.zip
A test case from recently closed #490, no review.
Diffstat (limited to 'test/files/pos/getClassType.scala')
-rw-r--r--test/files/pos/getClassType.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/getClassType.scala b/test/files/pos/getClassType.scala
new file mode 100644
index 0000000000..7482788a41
--- /dev/null
+++ b/test/files/pos/getClassType.scala
@@ -0,0 +1,16 @@
+trait IdlBase
+
+class IdlConcrete extends IdlBase
+
+class A {
+ // In general, this method should not need an instance to reflect on it, so
+ // take a Class[]
+ def reflect(clazz : Class[_ <: IdlBase]) = {
+ // Get a list of all its methods and build a hash keyed by method name
+ // for statistics recording.
+ }
+
+ // But I also really have an IdlConcrete generated by Spring here...
+ val idl = new IdlConcrete
+ reflect(idl.getClass)
+}