diff options
author | Paul Phillips <paulp@improving.org> | 2010-12-30 21:24:17 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-12-30 21:24:17 +0000 |
commit | c0bfbce726c9cb74154ee9f30166feb97bfd0331 (patch) | |
tree | b39f6dbd5fc86822bcbdd48f9f0dd0dedbe85c0c /src/library | |
parent | 89de9c3f9ff33d9fe74263f49ff8cdb987211fbf (diff) | |
download | scala-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/library')
-rw-r--r-- | src/library/scala/collection/immutable/WrappedString.scala | 3 |
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. |