aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/reflection-scala-annotations.scala
blob: d95f05fcbc402487622bacf8116a0d36e3fd817a (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 dotty.runtime.LegacyApp {
  println(symbolOf[S].annotations.head.tree)
  println(symbolOf[J].annotations.head.tree)
}