From b889dbf6de279551141b34df3a78a305588db695 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Thu, 23 Feb 2023 07:53:43 -0800 Subject: [PATCH] add regression test for pattern match on path-dependent type this was fixed recently (by #16827), but the test case is simpler than the one in the PR. minimized from user code on the Typelevel Discord --- tests/pos/t16827.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/pos/t16827.scala diff --git a/tests/pos/t16827.scala b/tests/pos/t16827.scala new file mode 100644 index 000000000000..17122fd9b580 --- /dev/null +++ b/tests/pos/t16827.scala @@ -0,0 +1,9 @@ +// scalac: -Werror + +trait Outer[F[_]]: + sealed trait Inner + trait Inner1 extends Inner + def foo(rv: Either[Inner, Int]) = + rv match + case Right(_) => + case Left(_) =>