Skip to content

Commit ad9cf71

Browse files
Backport "Implement Show[Seq[Nothing]]" to LTS (#22122)
Backports #21435 to the 3.3.5. PR submitted by the release tooling. [skip ci]
2 parents a7a4687 + 6270225 commit ad9cf71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/src/dotty/tools/dotc/printing/Formatting.scala

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ object Formatting {
7474
given [X: Show]: Show[Seq[X]] with
7575
def show(x: Seq[X]) = CtxShow(x.map(toStr))
7676

77+
given Show[Seq[Nothing]] with
78+
def show(x: Seq[Nothing]) = CtxShow(x)
79+
7780
given [K: Show, V: Show]: Show[Map[K, V]] with
7881
def show(x: Map[K, V]) =
7982
CtxShow(x.map((k, v) => s"${toStr(k)} => ${toStr(v)}"))

0 commit comments

Comments
 (0)