summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-30 21:24:17 +0000
committerPaul Phillips <paulp@improving.org>2010-12-30 21:24:17 +0000
commitc0bfbce726c9cb74154ee9f30166feb97bfd0331 (patch)
treeb39f6dbd5fc86822bcbdd48f9f0dd0dedbe85c0c /src
parent89de9c3f9ff33d9fe74263f49ff8cdb987211fbf (diff)
downloadscala-c0bfbce726c9cb74154ee9f30166feb97bfd0331.tar.gz
scala-c0bfbce726c9cb74154ee9f30166feb97bfd0331.tar.bz2
scala-c0bfbce726c9cb74154ee9f30166feb97bfd0331.zip
Removed Proxy from parents of WrappedString.
forward toString, but forwarding equals and hashCode breaks equality with sequences. Closes #4122, no review.
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/collection/immutable/WrappedString.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library/scala/collection/immutable/WrappedString.scala b/src/library/scala/collection/immutable/WrappedString.scala
index 62a39213d5..3a689bab85 100644
--- a/src/library/scala/collection/immutable/WrappedString.scala
+++ b/src/library/scala/collection/immutable/WrappedString.scala
@@ -29,7 +29,7 @@ import scala.util.matching.Regex
* @define Coll WrappedString
* @define coll wrapped string
*/
-class WrappedString(override val self: String) extends IndexedSeq[Char] with StringLike[WrappedString] with Proxy {
+class WrappedString(val self: String) extends IndexedSeq[Char] with StringLike[WrappedString] {
override protected[this] def thisCollection: WrappedString = this
override protected[this] def toCollection(repr: WrappedString): WrappedString = repr
@@ -39,6 +39,7 @@ class WrappedString(override val self: String) extends IndexedSeq[Char] with Str
override def slice(from: Int, until: Int): WrappedString =
new WrappedString(self.substring(from max 0, until min self.length))
+ override def toString = self
}
/** A companion object for wrapped strings.