summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/mutable/Cloneable.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-19 17:32:37 +0000
committerPaul Phillips <paulp@improving.org>2011-03-19 17:32:37 +0000
commit4380911a32eb7fa99faf5fea4ba5f9ad6a3a5258 (patch)
tree6f85fb000c50936d6d0ea5c19b9eede435b4eaec /src/library/scala/collection/mutable/Cloneable.scala
parent01203c2844e196696b8fe35acfae0ee6ede90ffa (diff)
downloadscala-4380911a32eb7fa99faf5fea4ba5f9ad6a3a5258.tar.gz
scala-4380911a32eb7fa99faf5fea4ba5f9ad6a3a5258.tar.bz2
scala-4380911a32eb7fa99faf5fea4ba5f9ad6a3a5258.zip
Removed long deprecated and obscure CloneableCo...
Removed long deprecated and obscure CloneableCollection. Discovered we have a scala.collection.mutable.Cloneable which does not extend java.lang.Cloneable, which is why Array is not considered cloneable. That seems wrong, but to be conservative I gave Array the Cloneable interface without altering the scala trait. Also, if @serializable is deprecated in favor of Serializable, should not @cloneable be deprecated analogously? Closes #4307, and a commit-question review by rytz.
Diffstat (limited to 'src/library/scala/collection/mutable/Cloneable.scala')
-rw-r--r--src/library/scala/collection/mutable/Cloneable.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library/scala/collection/mutable/Cloneable.scala b/src/library/scala/collection/mutable/Cloneable.scala
index 15c245fde0..28bf2ceb8e 100644
--- a/src/library/scala/collection/mutable/Cloneable.scala
+++ b/src/library/scala/collection/mutable/Cloneable.scala
@@ -18,6 +18,7 @@ package mutable
* @tparam A Type of the elements contained in the collection, covariant and with reference types as upperbound.
*/
@cloneable
-trait Cloneable[+A <: AnyRef] {
+trait Cloneable[+A <: AnyRef] {
+ // !!! why doesn't this extend java.lang.Cloneable?
override def clone: A = super.clone().asInstanceOf[A]
}