summaryrefslogtreecommitdiff
path: root/test/files/run/t8575c.scala
blob: 82199522999029acfe9375729c3f87342e2ee876 (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
class C

trait TypeMember {
  type X
  type Y
  type Z
}

object Test extends TypeMember {
  type A = X with Y
  type B = Z with A
  type F = A with B

  def main(args: Array[String]) {
    import reflect.runtime.universe._
    val t1 = typeOf[F with C]
    val t2 = typeOf[(A with B) with C]
    val t3 = typeOf[A with B with C]
    assert(t1 =:= t2)
    assert(t2 =:= t3)
    assert(t3 =:= t1)
  }
}