summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-10 00:32:49 -0700
committerPaul Phillips <paulp@improving.org>2012-10-10 00:32:49 -0700
commitb1e4032449d6ea83b77142a499ecda2a63c40cf1 (patch)
tree33faf83e1c4250bb02c3d0dca49eb5d2a18e9b27 /test/files/neg
parent2110569111759f400a33e369303a461094c0eceb (diff)
parenteed61bed1ff3ff70c32b579a5995da4ce59e2d67 (diff)
downloadscala-b1e4032449d6ea83b77142a499ecda2a63c40cf1.tar.gz
scala-b1e4032449d6ea83b77142a499ecda2a63c40cf1.tar.bz2
scala-b1e4032449d6ea83b77142a499ecda2a63c40cf1.zip
Merge pull request #1422 from paulp/typer-cycles
Typer cycles
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/cycle-bounds.check4
-rw-r--r--test/files/neg/cycle-bounds.flags1
-rw-r--r--test/files/neg/cycle-bounds.scala5
-rw-r--r--test/files/neg/t1224.check2
-rw-r--r--test/files/neg/t1224.flags1
5 files changed, 12 insertions, 1 deletions
diff --git a/test/files/neg/cycle-bounds.check b/test/files/neg/cycle-bounds.check
new file mode 100644
index 0000000000..d924838aec
--- /dev/null
+++ b/test/files/neg/cycle-bounds.check
@@ -0,0 +1,4 @@
+cycle-bounds.scala:5: error: illegal cyclic reference involving type T
+class NotOk[T <: Comparable[_ <: T]]
+ ^
+one error found
diff --git a/test/files/neg/cycle-bounds.flags b/test/files/neg/cycle-bounds.flags
new file mode 100644
index 0000000000..ca20f55172
--- /dev/null
+++ b/test/files/neg/cycle-bounds.flags
@@ -0,0 +1 @@
+-Ybreak-cycles
diff --git a/test/files/neg/cycle-bounds.scala b/test/files/neg/cycle-bounds.scala
new file mode 100644
index 0000000000..0b43bc703e
--- /dev/null
+++ b/test/files/neg/cycle-bounds.scala
@@ -0,0 +1,5 @@
+// This should be allowed
+class Ok[T <: Comparable[_ >: T]]
+
+// This is (il)legitimately a cyclic reference
+class NotOk[T <: Comparable[_ <: T]]
diff --git a/test/files/neg/t1224.check b/test/files/neg/t1224.check
index fb61275911..ab8a6f1130 100644
--- a/test/files/neg/t1224.check
+++ b/test/files/neg/t1224.check
@@ -1,4 +1,4 @@
-t1224.scala:4: error: illegal cyclic reference involving type T
+t1224.scala:4: error: lower bound C[A.this.T] does not conform to upper bound C[C[A.this.T]]
type T >: C[T] <: C[C[T]]
^
one error found
diff --git a/test/files/neg/t1224.flags b/test/files/neg/t1224.flags
new file mode 100644
index 0000000000..ca20f55172
--- /dev/null
+++ b/test/files/neg/t1224.flags
@@ -0,0 +1 @@
+-Ybreak-cycles