diff options
Diffstat (limited to 'test/files/run/reflection-scala-annotations.scala')
-rw-r--r-- | test/files/run/reflection-scala-annotations.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/reflection-scala-annotations.scala b/test/files/run/reflection-scala-annotations.scala new file mode 100644 index 0000000000..f6a6895ee0 --- /dev/null +++ b/test/files/run/reflection-scala-annotations.scala @@ -0,0 +1,16 @@ +import scala.reflect.runtime.universe._ +import scala.annotation._ + +class sann(x: Int, y: List[Int]) extends StaticAnnotation +class jann(x: Int, y: Array[Int]) extends ClassfileAnnotation + +@sann(1, List(1, 2)) +class S + +@jann(y = Array(1, 2), x = 2) +class J + +object Test extends App { + println(symbolOf[S].annotations.head.tree) + println(symbolOf[J].annotations.head.tree) +} |