aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/pos/proj-rec-test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pending/pos/proj-rec-test.scala')
-rw-r--r--tests/pending/pos/proj-rec-test.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pending/pos/proj-rec-test.scala b/tests/pending/pos/proj-rec-test.scala
new file mode 100644
index 000000000..b7efcf3e8
--- /dev/null
+++ b/tests/pending/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
+}
+