annotations - How to annotate a type parameter in scala -


java 8 supports annotations on type parameters such as

class somebean {      optional<@base64 string> bs; } 

how can written in scala (if possible)? i've tried following (which compiles), resulting byte code not make mention of base64 annotation:

case class somescalabean(bs: optional[string @base64])  

note: if you're wondering, hibernate validator making use of this, see http://docs.jboss.org/hibernate/stable/validator/reference/en-us/html_single/#type-arguments-constraints

edit: created ticket - https://issues.scala-lang.org/browse/si-9883


Comments