Skip to content

Commit 42f96b4

Browse files
authored
Merge pull request #5850 from dotty-staging/fix-#4371-2
Fix #4371: Add regression tests
2 parents 0d63b0c + 5d7fdea commit 42f96b4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/neg/i4371a.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object App {
2+
class Foo { type A = Boo#B } // error: illegal cyclic reference: alias App.Boo#B of type A refers back to the type itself
3+
class Boo { type B = Foo#A }
4+
}

tests/neg/i4371b.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object App {
2+
type T[G[X] <: X, F[X] <: G[F[X]]] // error: Recursion limit exceeded. Maybe there is an illegal cyclic reference? ...
3+
}

0 commit comments

Comments
 (0)