diff options
author | Philipp Haller <hallerp@gmail.com> | 2009-07-28 10:01:46 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2009-07-28 10:01:46 +0000 |
commit | 27700284fa191c42a04e6c1619a76dfd261a59dc (patch) | |
tree | c7a0213cb494e633c80352e649afb2eb7e402ef6 /src/library | |
parent | cc711eef357d5461f4987e7a78f852ac11700532 (diff) | |
download | scala-27700284fa191c42a04e6c1619a76dfd261a59dc.tar.gz scala-27700284fa191c42a04e6c1619a76dfd261a59dc.tar.bz2 scala-27700284fa191c42a04e6c1619a76dfd261a59dc.zip |
Fixed #2183.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/generic/MutableSetTemplate.scala | 4 | ||||
-rw-r--r-- | src/library/scala/collection/mutable/HashSet.scala | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/collection/generic/MutableSetTemplate.scala b/src/library/scala/collection/generic/MutableSetTemplate.scala index 1f29838174..d79c737e66 100644 --- a/src/library/scala/collection/generic/MutableSetTemplate.scala +++ b/src/library/scala/collection/generic/MutableSetTemplate.scala @@ -41,7 +41,7 @@ trait MutableSetTemplate[A, +This <: MutableSetTemplate[A, This] with mutable.Se with Builder[A, This] with Growable[A] with Shrinkable[A] - with Cloneable[This] + with Cloneable[mutable.Set[A]] { self => /** A common implementation of <code>newBuilder</code> for all mutable sets @@ -103,7 +103,7 @@ trait MutableSetTemplate[A, +This <: MutableSetTemplate[A, This] with mutable.Se */ def clear() { foreach(-=) } - override def clone(): This = empty ++= thisCollection + override def clone(): mutable.Set[A] = empty ++= thisCollection def result: This = thisCollection diff --git a/src/library/scala/collection/mutable/HashSet.scala b/src/library/scala/collection/mutable/HashSet.scala index 12b7398db1..b150c75773 100644 --- a/src/library/scala/collection/mutable/HashSet.scala +++ b/src/library/scala/collection/mutable/HashSet.scala @@ -48,7 +48,7 @@ class HashSet[A] extends Set[A] } } - override def clone(): HashSet[A] = new HashSet[A] ++= this + override def clone(): Set[A] = new HashSet[A] ++= this } /** Factory object for `HashSet` class */ |