diff options
author | Martin Odersky <odersky@gmail.com> | 2016-01-12 11:37:21 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-19 14:00:01 +0100 |
commit | dbf04a67bbd06c5beebb958d0012ae300a20d0d1 (patch) | |
tree | 2949f92b74070cc45ef840e00df9f5721099d851 /tests/neg/cycles.scala | |
parent | 556230ad15c7a2587d6e34496dae00fc310efe42 (diff) | |
download | dotty-dbf04a67bbd06c5beebb958d0012ae300a20d0d1.tar.gz dotty-dbf04a67bbd06c5beebb958d0012ae300a20d0d1.tar.bz2 dotty-dbf04a67bbd06c5beebb958d0012ae300a20d0d1.zip |
Annotate test with // error indications
We had same fleyness in number of errors of cycle.scala
which prompted this.
Diffstat (limited to 'tests/neg/cycles.scala')
-rw-r--r-- | tests/neg/cycles.scala | 13 |
1 files changed, 7 insertions, 6 deletions
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 = ??? } } |