From b9124825ec32b60998e107e6b075052d29faae9d Mon Sep 17 00:00:00 2001 From: Matt Bovel Date: Fri, 14 Feb 2025 15:47:54 +0100 Subject: [PATCH] Add regression test for #22076 (#22602) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #22076. --------- Co-authored-by: Sébastien Doeraene [Cherry-picked a601e83dffd1d1239c295eb5d50e0d4b93412b91] --- tests/pos/match-type-disjoint-22076.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/pos/match-type-disjoint-22076.scala diff --git a/tests/pos/match-type-disjoint-22076.scala b/tests/pos/match-type-disjoint-22076.scala new file mode 100644 index 000000000000..c10555501b97 --- /dev/null +++ b/tests/pos/match-type-disjoint-22076.scala @@ -0,0 +1,8 @@ +trait Foo[CP <: NonEmptyTuple]: + type EndNode = Tuple.Last[CP] + +def f(end: Foo[?]): end.EndNode = + ??? + +trait Bar[CP <: NonEmptyTuple] extends Foo[CP]: + val v: EndNode = f(this)