blob: f6a6895ee06b1febd16d10a4e59ebc78bc5a2a6d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import scala.reflect.runtime.universe._
import scala.annotation._
class sann(x: Int, y: List[Int]) extends StaticAnnotation
class jann(x: Int, y: Array[Int]) extends ClassfileAnnotation
@sann(1, List(1, 2))
class S
@jann(y = Array(1, 2), x = 2)
class J
object Test extends App {
println(symbolOf[S].annotations.head.tree)
println(symbolOf[J].annotations.head.tree)
}
|