summaryrefslogtreecommitdiff
path: root/test/files/pos/annotations.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/annotations.scala')
-rw-r--r--test/files/pos/annotations.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/annotations.scala b/test/files/pos/annotations.scala
index 5492d89351..d1bd6ba264 100644
--- a/test/files/pos/annotations.scala
+++ b/test/files/pos/annotations.scala
@@ -1,5 +1,14 @@
class ann(i: Int) extends Annotation
+// annotations on abstract types
+abstract class C1[@serializable @cloneable +T, U, V[_]]
+abstract class C2[@deprecated
+ @ann(1) T <: Number,
+ V]
+abstract class C3 {
+ @ann(2) type X <: Number
+}
+
object Test {
// bug #1028
@@ -10,6 +19,7 @@ object Test {
def c: Int @ann(x) = 1
def d: String @ann({val z = 0; z - 1}) = "2"
+ def e[@deprecated T, U](x: T) = x
//bug #1214
val y = new (Integer @ann(0))(2)