summaryrefslogtreecommitdiff
path: root/test/files/jvm5/annotations.scala
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-04-17 08:03:55 +0000
committermihaylov <mihaylov@epfl.ch>2007-04-17 08:03:55 +0000
commit17227e1b2e144282bd8b8c27c1b8511e55209d24 (patch)
tree72214a8fd211a3800c392f7426fedf7e1e1e19f9 /test/files/jvm5/annotations.scala
parentc0ace80be3fd6e589248d6b372a08e2d96381241 (diff)
downloadscala-17227e1b2e144282bd8b8c27c1b8511e55209d24.tar.gz
scala-17227e1b2e144282bd8b8c27c1b8511e55209d24.tar.bz2
scala-17227e1b2e144282bd8b8c27c1b8511e55209d24.zip
fixed the jvm5/annotations.scala test case
Diffstat (limited to 'test/files/jvm5/annotations.scala')
-rw-r--r--test/files/jvm5/annotations.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/files/jvm5/annotations.scala b/test/files/jvm5/annotations.scala
index a58921adef..f7fe903d84 100644
--- a/test/files/jvm5/annotations.scala
+++ b/test/files/jvm5/annotations.scala
@@ -74,9 +74,13 @@ object Test4 {
@SourceAnnotation("http://bloodsuckers.com")
class Foo3
def run {
- classOf[Foo1].getAnnotations foreach Console.println
- classOf[Foo2].getAnnotations foreach Console.println
- classOf[Foo3].getAnnotations foreach Console.println
+ def printSourceAnnotation(a: Any) {
+ val ann = a.asInstanceOf[SourceAnnotation]
+ Console.println("@test.SourceAnnotation(mail=" + ann.mail + ", value=" + ann.value + ")")
+ }
+ classOf[Foo1].getAnnotations foreach printSourceAnnotation
+ classOf[Foo2].getAnnotations foreach printSourceAnnotation
+ classOf[Foo3].getAnnotations foreach printSourceAnnotation
}
}