Skip to content

Commit df7c559

Browse files
Workaround bug in String.valueOf(null) in some VMs
1 parent 8a27d34 commit df7c559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/dotty/Show.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ trait Show[T] {
66

77
trait LowPrioShow {
88
implicit def defaultShow[T]: Show[T] = new Show[T] {
9-
def show(x: T) = String.valueOf(x)
9+
def show(x: T) = if (x == null) "null" else x.toString
1010
}
1111
}
1212

0 commit comments

Comments
 (0)