summaryrefslogblamecommitdiff
path: root/test/files/run/reflection-java-crtp.scala
blob: 260d3540dc5d91e388132f3f25a57773c2f983e0 (plain) (tree)
1
2
3
4
5
6
7
8






                                                                                          
 
object Test extends App {
  import scala.reflect.runtime.universe._
  val enum = typeOf[JavaSimpleEnumeration].baseClasses(1).asClass
  // make sure that the E's in Enum<E extends Enum<E>> are represented by the same symbol
  val e1 = enum.typeParams(0).asType
  val TypeBounds(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _)))) = e1.typeSignature
  println(e1, e2, e1 eq e2)
}