Skip to content

Commit 210c6ed

Browse files
Blaisorbladeodersky
authored andcommitted
Testcase: more recursion
1 parent deecd9f commit 210c6ed

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tests/pos/i4884.scala

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
object Test {
22
trait A
33
trait B
4-
trait TestConstructor1 { type F[_ <: A] }
4+
trait TestConstructor1 { type F[X <: A] <: TestConstructor2[A] }
55
trait TestConstructor2[D] {
66
type F[_ <: D]
77
class G[X <: D]
88
trait TestConstructor3[E] {
9-
type G[_ <: D & E]
10-
class H[X <: D & E]
9+
type G[X <: D & E] <: TestConstructor2.this.F[X] & H[X]
10+
class H[X <: D & E] {
11+
type A <: G[X]
12+
}
13+
}
14+
}
15+
trait TestConstructor4[D] {
16+
trait TestConstructor5[E] {
17+
trait MSetLike[X <: D & E, This <: MSet[X] with MSetLike[X, This]]
18+
trait MSet[X <: D & E] extends MSetLike[X, MSet[X]]
1119
}
1220
}
1321

@@ -34,4 +42,7 @@ object Test {
3442
type S1[c <: C] = ([X <: C] => f.F[X] & g.G[X])[c]
3543
type S2[c <: C] = ([X <: C] => f.F[X] | g.G[X])[c]
3644
}
45+
def f3(f: TestConstructor4[A], g: f.TestConstructor5[B]): Unit = {
46+
type P1[c <: C] = g.MSet[c]
47+
}
3748
}

0 commit comments

Comments
 (0)