blob: ced6f56b529d4c5444963669c76622f4a83687df (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
class Foo[T <: U, U <: T] // error: cycle
class Bar[T >: T] // error: cycle
class A {
val x: T = ???
type T <: x.type // error: cycle
}
class B {
type T <: x.type // error: cycle
final val x: T = ???
}
class C {
final val x: D#T = ???
class D {
type T <: x.type // error: cycle
val z: x.type = ???
}
}
class E {
class F {
type T <: x.type // error: not stable
val z: x.type = ??? // error: not stable
}
lazy val x: F#T = ???
}
class T1 {
type X = (U, U) // error: cycle
type U = X & Int
}
class T2 {
type X = (U, U) // error: cycle
type U = X | Int
}
object T12 {
??? : (T1 {})#U // error: conflicting bounds
??? : (T2 {})#U // error: conflicting bounds
}
|