Closed
Description
I would expect all of these to compile.
class T(value: Any) extends ClassfileAnnotation
object Holder {
final val as = Array(1, 2, 3)
final val a = 1
final val cint = classOf[Int]
}
import Holder._
@T(classOf[Int])
@T(cint) // error: annotation argument needs to be a constant; found: cint
@T(Array("", "", "")) // error: annotation argument needs to be a constant; found: as
@T(as) // error: annotation argument needs to be a constant; found: as
@T(1)
@T(a)
class Target
Tested with 2.8.0.Beta1 and 2.8.0.r21166-b20100315020141.