summaryrefslogtreecommitdiff
path: root/test/files/run/reflection-java-crtp.check
blob: 0f30b453c092f9bbbdee3896a0a6f2c036476595 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Type in expressions to have them evaluated.
Type :help for more information.

scala> 

scala>     import scala.reflect.runtime.universe._
import scala.reflect.runtime.universe._

scala>     val enum = typeOf[SimpleEnumeration].baseClasses(1).asClass
enum: reflect.runtime.universe.ClassSymbol = class Enum

scala>     // make sure that the E's in Enum<E extends Enum<E>> are represented by the same symbol

scala>     val e1 = enum.typeParams(0).asType
e1: reflect.runtime.universe.TypeSymbol = type E

scala>     val TypeBounds(_, ExistentialType(_, TypeRef(_, _, List(TypeRef(_, e2: TypeSymbol, _))))) = e1.typeSignature
e2: reflect.runtime.universe.TypeSymbol = type E

scala>     println(e1 eq e2)
true

scala> 

scala>