From 9465d65e185236353811e3cada62b91df61a1076 Mon Sep 17 00:00:00 2001 From: Eugene Flesselle Date: Mon, 3 Jun 2024 16:51:07 +0200 Subject: [PATCH] Add test for #20482 tryNormalize used to not recursively check if tycon of applied type was normalizable, this may be necessary in the case of an applied type dealiasing to a type lambda. Fixes #20482 --- tests/pos/i20482.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/pos/i20482.scala diff --git a/tests/pos/i20482.scala b/tests/pos/i20482.scala new file mode 100644 index 000000000000..2a7680df054d --- /dev/null +++ b/tests/pos/i20482.scala @@ -0,0 +1,16 @@ +trait WrapperType[A] + +case class Foo[A]() + +case class Bar[A]() + +type FooToBar[D[_]] = [A] =>> D[Unit] match { + case Foo[Unit] => Bar[A] +} + +case class Test() +object Test { + implicit val wrapperType: WrapperType[Bar[Test]] = new WrapperType[Bar[Test]] {} +} + +val test = summon[WrapperType[FooToBar[Foo][Test]]]