class Foo {
@SomeAnnotation
var bar: String = _
}
@SomeAnnotation is a Java annotation (so it is kept at runtime) with runtime retention and Method target. The code compiles, but at runtime the bar() and bar_=() methods that the compiler generated are not annotated.
Assuming this is not a bug, is there a clean way of annotating the generated getter method without needing to def the method explicitly?
This mailing list post might be of use:
http://old.nabble.com/-scala–field-annotations,-getters-setters-and-BeanProperty-td24970781.html