summaryrefslogtreecommitdiff
path: root/test/files/neg/t5093.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-19 17:19:08 +0000
committerPaul Phillips <paulp@improving.org>2011-10-19 17:19:08 +0000
commit8fc7a72a2b7765b6f5c6c5feb2bcaae58e735396 (patch)
tree26f3154d1ff9fb8d90f842f3c39fcf35b964a790 /test/files/neg/t5093.check
parentfb2353db6cc296289092ffa948e2e1c5f06c0d59 (diff)
downloadscala-8fc7a72a2b7765b6f5c6c5feb2bcaae58e735396.tar.gz
scala-8fc7a72a2b7765b6f5c6c5feb2bcaae58e735396.tar.bz2
scala-8fc7a72a2b7765b6f5c6c5feb2bcaae58e735396.zip
Cycle defense.
Notice when a typeref's info creates an obvious cycle, so we can see an error instead of a stack overflow. Closes SI-5093, review by moors.
Diffstat (limited to 'test/files/neg/t5093.check')
-rw-r--r--test/files/neg/t5093.check10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/t5093.check b/test/files/neg/t5093.check
new file mode 100644
index 0000000000..daba460011
--- /dev/null
+++ b/test/files/neg/t5093.check
@@ -0,0 +1,10 @@
+t5093.scala:2: error: illegal cyclic reference involving type C
+ def f[C[X] <: C[X]](l: C[_]) = l.x
+ ^
+t5093.scala:2: error: cyclic aliasing or subtyping involving type C
+ def f[C[X] <: C[X]](l: C[_]) = l.x
+ ^
+t5093.scala:2: error: C does not take type parameters
+ def f[C[X] <: C[X]](l: C[_]) = l.x
+ ^
+three errors found