aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/cycles.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-02-19 17:24:23 +0100
committerodersky <odersky@gmail.com>2016-02-19 17:24:23 +0100
commit2217a4ec9ea563f01b07c852a3834d738cd6439d (patch)
tree4ac8601a9fc598d2faeaf940fb35fa12eb6b4c1f /tests/neg/cycles.scala
parentea407f143591aa9ffd0fd0f9a25a9ec9e812e76c (diff)
parent12301586418ebad71c7d7d5ce9a53ea4909f675a (diff)
downloaddotty-2217a4ec9ea563f01b07c852a3834d738cd6439d.tar.gz
dotty-2217a4ec9ea563f01b07c852a3834d738cd6439d.tar.bz2
dotty-2217a4ec9ea563f01b07c852a3834d738cd6439d.zip
Merge pull request #1072 from dotty-staging/change-isVolatile-2
Change is volatile 2
Diffstat (limited to 'tests/neg/cycles.scala')
-rw-r--r--tests/neg/cycles.scala13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/neg/cycles.scala b/tests/neg/cycles.scala
index 11efea625..f9e546aca 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 = ???
}
}