From 27700284fa191c42a04e6c1619a76dfd261a59dc Mon Sep 17 00:00:00 2001 From: Philipp Haller Date: Tue, 28 Jul 2009 10:01:46 +0000 Subject: Fixed #2183. --- src/library/scala/collection/generic/MutableSetTemplate.scala | 4 ++-- src/library/scala/collection/mutable/HashSet.scala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 newBuilder 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 */ -- cgit v1.2.3