From ab9381b4539097205d19df235f8cc3a5b2349e95 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 30 May 2009 14:55:00 +0000 Subject: Null check on RichString->String implicit. --- src/library/scala/Predef.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index c2ade6dd0f..da4e51e2aa 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -246,7 +246,7 @@ object Predef { /** any array projection can be automatically converted into an array */ //implicit def forceArrayProjection[A](x: Array.Projection[A]): Array[A] = x.force !!! re-enable? /** any random access character seq (including rich string can be converted into a string */ - implicit def richString2String(x: runtime.RichString): String = x.toString + implicit def richString2String(x: runtime.RichString): String = if (x eq null) null else x.toString //implicit def lazyStreamToConsable[A](xs: => Stream[A]) = new runtime.StreamCons(xs) implicit def seqToCharSequence(xs: collection.Vector[Char]): CharSequence = new CharSequence { -- cgit v1.2.3