diff --git a/tests/pos/i5700.scala b/tests/pos/i5700.scala new file mode 100644 index 000000000000..69892dea16f4 --- /dev/null +++ b/tests/pos/i5700.scala @@ -0,0 +1,5 @@ +// https://github.com/lampepfl/dotty/issues/5700 +object noRecursionLimit: + type M = { type T[+A]; type Ev >: T[Any] <: T[Nothing] } + val M: M = ().asInstanceOf[M] + def dcast(m: M.T[Any]): M.T[Int] = m: M.Ev