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)