From 4281b10a39037cc2a35aa4e6ffe944d7c25f1dff Mon Sep 17 00:00:00 2001 From: Tim Spence Date: Tue, 4 Oct 2022 17:17:46 +0100 Subject: [PATCH] Refine append return type --- library/src/scala/Tuple.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/scala/Tuple.scala b/library/src/scala/Tuple.scala index 703f8a1e2992..fa72e320b560 100644 --- a/library/src/scala/Tuple.scala +++ b/library/src/scala/Tuple.scala @@ -83,7 +83,7 @@ sealed trait Tuple extends Product { object Tuple { /** Type of a tuple with an element appended */ - type Append[X <: Tuple, Y] <: Tuple = X match { + type Append[X <: Tuple, Y] <: NonEmptyTuple = X match { case EmptyTuple => Y *: EmptyTuple case x *: xs => x *: Append[xs, Y] }