diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm5/annotations.scala | 10 |
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 } } |