summaryrefslogtreecommitdiff
path: root/test/files/pos/proj-rec-test.scala
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-09-05 14:25:05 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-09-05 14:25:05 +0000
commitfa8d0d8d853cebdfa33552ca2f66c229b6d39f2d (patch)
treea626126927ae5f7c1933689bdfcf290d239064fe /test/files/pos/proj-rec-test.scala
parentd0eb6ae1a2a6136ed90d7cbab0efcacc4cd4c337 (diff)
downloadscala-fa8d0d8d853cebdfa33552ca2f66c229b6d39f2d.tar.gz
scala-fa8d0d8d853cebdfa33552ca2f66c229b6d39f2d.tar.bz2
scala-fa8d0d8d853cebdfa33552ca2f66c229b6d39f2d.zip
Added support for -Yrecursion compiler flag.
Added two tests involving this flag.
Diffstat (limited to 'test/files/pos/proj-rec-test.scala')
-rw-r--r--test/files/pos/proj-rec-test.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/pos/proj-rec-test.scala b/test/files/pos/proj-rec-test.scala
new file mode 100644
index 0000000000..b7efcf3e8d
--- /dev/null
+++ b/test/files/pos/proj-rec-test.scala
@@ -0,0 +1,13 @@
+object ProjTest {
+ trait MInt { type Type }
+ trait _0 extends MInt { type Type = Boolean }
+ trait Succ[Pre <: MInt] extends MInt { type Type = Pre#Type }
+
+ type _1 = Succ[_0]
+ type _2 = Succ[_1]
+
+ type X1 = _0#Type // Ok
+ type X2 = _1#Type // Ok
+ type X3 = _2#Type // Compiler error, illegal cyclic reference involving type Type
+}
+