diff options
Diffstat (limited to 'tests/pending/pos')
-rw-r--r-- | tests/pending/pos/compound.scala | 4 | ||||
-rw-r--r-- | tests/pending/pos/subtypcycle.scala | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/pending/pos/compound.scala b/tests/pending/pos/compound.scala index 60890f910..308ffdfd9 100644 --- a/tests/pending/pos/compound.scala +++ b/tests/pending/pos/compound.scala @@ -7,3 +7,7 @@ abstract class Test { var xx: A with B { type T; val xz: T } = null; xx = yy; } +abstract class Test2 { + var yy: A with B { type T; val xz: T } = null; + val xx: A with B { type T; val xz: T } = yy +} diff --git a/tests/pending/pos/subtypcycle.scala b/tests/pending/pos/subtypcycle.scala new file mode 100644 index 000000000..76eb7ffec --- /dev/null +++ b/tests/pending/pos/subtypcycle.scala @@ -0,0 +1,10 @@ +object subtypcycle { + trait Y { + type A <: { type T >: B } + type B >: { type T >: A } + } + + val y: Y = ??? + val a: y.A = ??? + val b: y.B = a +} |