summaryrefslogtreecommitdiff
path: root/test/files/run/t6860.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t6860.scala')
-rw-r--r--test/files/run/t6860.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/t6860.scala b/test/files/run/t6860.scala
new file mode 100644
index 0000000000..c2f8db02c2
--- /dev/null
+++ b/test/files/run/t6860.scala
@@ -0,0 +1,20 @@
+class Bippy[T](val value: T) extends annotation.StaticAnnotation
+
+class A {
+ @Bippy("hi") def f1: Int = 1
+ @Bippy[String]("hi") def f2: Int = 2
+
+ @throws("what do I throw?") def f3 = throw new RuntimeException
+ @throws[RuntimeException]("that's good to know!") def f4 = throw new RuntimeException
+}
+
+object Test {
+ import scala.reflect.runtime.universe._
+
+ def main(args: Array[String]): Unit = {
+ val members = typeOf[A].decls.toList
+ val tpes = members flatMap (_.annotations) map (_.tree.tpe)
+
+ tpes.map(_.toString).sorted foreach println
+ }
+}