aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2014-10-20 11:19:50 +0200
committerGuillaume Martres <smarter@ubuntu.com>2014-11-06 22:08:28 +0100
commit3d6534f1d3f1abe5ec9c27a7d0452142ae7d3d86 (patch)
tree016cc48187474714964bae081072fa485c423aaf /tests/neg
parent8c73426c1db5e867febf9abf565de4201f78d628 (diff)
downloaddotty-3d6534f1d3f1abe5ec9c27a7d0452142ae7d3d86.tar.gz
dotty-3d6534f1d3f1abe5ec9c27a7d0452142ae7d3d86.tar.bz2
dotty-3d6534f1d3f1abe5ec9c27a7d0452142ae7d3d86.zip
Detect cycles involving types bounded by singleton types
This fixes #193.
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/cycles.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/neg/cycles.scala b/tests/neg/cycles.scala
index 4eaec125f..dbcbe1efb 100644
--- a/tests/neg/cycles.scala
+++ b/tests/neg/cycles.scala
@@ -2,3 +2,28 @@ class Foo[T <: U, U <: T]
class Bar[T >: T]
+class A {
+ val x: T = ???
+ type T <: x.type
+}
+
+class B {
+ type T <: x.type
+ val x: T = ???
+}
+
+class C {
+ val x: D#T = ???
+ class D {
+ type T <: x.type
+ val z: x.type = ???
+ }
+}
+
+class E {
+ class F {
+ type T <: x.type
+ val z: x.type = ???
+ }
+ val x: F#T = ???
+}