summaryrefslogtreecommitdiff
path: root/test/files/pos/proj-rec-test.scala
blob: b7efcf3e8ddad69d9f477a7be7cb20c515627052 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
object ProjTest {
  trait MInt { type Type }
  trait _0 extends MInt { type Type = Boolean }
  trait Succ[Pre <: MInt] extends MInt { type Type = Pre#Type }

  type _1 = Succ[_0]
  type _2 = Succ[_1]

  type X1 = _0#Type   // Ok
  type X2 = _1#Type   // Ok
  type X3 = _2#Type   // Compiler error, illegal cyclic reference involving type Type
}