I am trying to discover if a trait's value has an annotation associated to it. After reviewing the Scala 2.10-M7 reflection API I thought that the getAnnotations method (located in Symbol) could be a great candidate, but it is returning an empty list, as shown in the following REPL session:
scala> class W extends scala.annotation.Annotation
defined class W
scala> trait A { @W val a: Int }
defined trait A
scala> typeOf[A].members.last
res0: $r.intp.global.Symbol = value a
scala> res0.getAnnotations
res1: List[$r.intp.global.AnnotationInfo] = List()
Are those "annotations" the same annotations I am trying to deal with? How can I know if a is annotated with W?