From dbf04a67bbd06c5beebb958d0012ae300a20d0d1 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 12 Jan 2016 11:37:21 +0100 Subject: Annotate test with // error indications We had same fleyness in number of errors of cycle.scala which prompted this. --- tests/neg/cycles.scala | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/neg/cycles.scala') diff --git a/tests/neg/cycles.scala b/tests/neg/cycles.scala index ced6f56b5..50bfa36f1 100644 --- a/tests/neg/cycles.scala +++ b/tests/neg/cycles.scala @@ -1,21 +1,22 @@ -class Foo[T <: U, U <: T] // error: cycle +class Foo[T <: U, U <: T] // error: illegal cyclic reference: upper bound U of type T refers back to the type itself + +class Bar[T >: T] // error: illegal cyclic reference: lower bound T of type T refers back to the type itself -class Bar[T >: T] // error: cycle class A { val x: T = ??? - type T <: x.type // error: cycle + type T <: x.type // error: cyclic reference involving value x } class B { - type T <: x.type // error: cycle - final val x: T = ??? + type T <: x.type // error: illegal cyclic reference: upper bound B.this.T(B.this.x) of type T refers back to the type itself + val x: T = ??? } class C { final val x: D#T = ??? class D { - type T <: x.type // error: cycle + type T <: x.type // error: cyclic reference involving value x val z: x.type = ??? } } -- cgit v1.2.3