diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2009-06-18 17:19:55 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2009-06-18 17:19:55 +0000 |
commit | 3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8 (patch) | |
tree | e97b8c0dd8d61e82f825f528f98842f777621f7a /test/files/pos/spec-annotations.scala | |
parent | be8e3c69114da5bc3020d5363b338b1c83aa22ef (diff) | |
download | scala-3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8.tar.gz scala-3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8.tar.bz2 scala-3ee6b3653f8c25d7d6b19b9f5d4af7fa082146a8.zip |
Specialization landed in trunk.
Diffstat (limited to 'test/files/pos/spec-annotations.scala')
-rw-r--r-- | test/files/pos/spec-annotations.scala | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/files/pos/spec-annotations.scala b/test/files/pos/spec-annotations.scala new file mode 100644 index 0000000000..215f00da50 --- /dev/null +++ b/test/files/pos/spec-annotations.scala @@ -0,0 +1,35 @@ +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 + val x = 1 + @ann(x) val a = () + @ann({val y = 2; y}) val b = () + + 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) + + import scala.reflect.BeanProperty + + // bug #637 + trait S { def getField(): Int } + class O extends S { @BeanProperty val field = 0 } + + // bug #1070 + trait T { @BeanProperty var field = 1 } +} + |