aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-15 16:48:29 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-01-16 21:26:55 +0100
commit8e84133598f879c1cb0ad4b9faf2a90c0403536f (patch)
treec36edb75ae0579cada43f7f487c4a30b4cc1dd3c /tests
parenta4f35e2cf41dd38a35688f351510603165c6f89f (diff)
downloaddotty-8e84133598f879c1cb0ad4b9faf2a90c0403536f.tar.gz
dotty-8e84133598f879c1cb0ad4b9faf2a90c0403536f.tar.bz2
dotty-8e84133598f879c1cb0ad4b9faf2a90c0403536f.zip
Fix checkNonCyclic.
Need to also look info refined types. Need to handle case where we hit a NoCompleter again. Fixes #974 and makes MutableSortedSetFactory in stdlib compile.
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/i974.scala8
-rw-r--r--tests/pos/i974.scala2
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/neg/i974.scala b/tests/neg/i974.scala
new file mode 100644
index 000000000..89db4b2d9
--- /dev/null
+++ b/tests/neg/i974.scala
@@ -0,0 +1,8 @@
+trait Foo[T <: Bar[T]#Elem] // error: illegal cyclic reference
+trait Bar[T] {
+ type Elem = T
+}
+trait Foo2[T <: Bar2[T]#Elem] // error: illegal cyclic reference
+trait Bar2[T] {
+ type Elem = T
+}
diff --git a/tests/pos/i974.scala b/tests/pos/i974.scala
new file mode 100644
index 000000000..4c7c15e8d
--- /dev/null
+++ b/tests/pos/i974.scala
@@ -0,0 +1,2 @@
+class Foo[A]
+class Bar[CC[X] <: Foo[CC[X]]]