summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-05-30 14:55:00 +0000
committerPaul Phillips <paulp@improving.org>2009-05-30 14:55:00 +0000
commitab9381b4539097205d19df235f8cc3a5b2349e95 (patch)
tree45afe8d27fabc9a710ff55c7f17e20c4de317490 /src
parent1dd1702022a67e5bd031c7f130bb4d78736b2e00 (diff)
downloadscala-ab9381b4539097205d19df235f8cc3a5b2349e95.tar.gz
scala-ab9381b4539097205d19df235f8cc3a5b2349e95.tar.bz2
scala-ab9381b4539097205d19df235f8cc3a5b2349e95.zip
Null check on RichString->String implicit.
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/Predef.scala2
1 files changed, 1 insertions, 1 deletions
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 {