From bced8c8ec99fbec2f5e63b276efc2dac733afd65 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Sun, 14 May 2023 12:20:06 +0200 Subject: [PATCH] test: add in a regression test for #11223 [skip community_build] closes #11223 --- tests/pos/i11223.scala | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/pos/i11223.scala diff --git a/tests/pos/i11223.scala b/tests/pos/i11223.scala new file mode 100644 index 000000000000..a3583ca955c4 --- /dev/null +++ b/tests/pos/i11223.scala @@ -0,0 +1,21 @@ +object T: + trait M[F[_]] + trait EE[A, B] + trait AE[A] + trait DE[A] + trait CE[A] + + type A1 = M[AE] + type D1 = M[DE] | M[[a] =>> EE[Int, a]] + type C1 = M[CE] + + trait F[+R, +A]: + def <+>[U, B](b: F[U, B]): F[R | U, A] = null + def int: F[R | A1, Int] + + def d1[A](f: => A): F[D1, A] = null + def m[R, A](f: F[R | C1, A]): F[R | C1, A] = null + + def x = m { // adding type annotation here helps (m[D1 | A1 | C1, Int]) + d1(123).int <+> null + }