summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/util/WeakHashSet.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-05-02 14:39:13 -0700
committerPaul Phillips <paulp@improving.org>2012-05-02 18:23:14 -0700
commit6300c3033e7b852c6cbef332af6085aac6150a70 (patch)
tree4a508dc17945e3152c80e27a4a122196e348a5cd /src/compiler/scala/tools/nsc/util/WeakHashSet.scala
parentb6e989fbf63c9f47acfb54175241b42fdfbfe51b (diff)
downloadscala-6300c3033e7b852c6cbef332af6085aac6150a70.tar.gz
scala-6300c3033e7b852c6cbef332af6085aac6150a70.tar.bz2
scala-6300c3033e7b852c6cbef332af6085aac6150a70.zip
Eliminating reflective calls.
Frobbed knobs and made little traits until all relevant looking reflective calls were gone.
Diffstat (limited to 'src/compiler/scala/tools/nsc/util/WeakHashSet.scala')
-rw-r--r--src/compiler/scala/tools/nsc/util/WeakHashSet.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/util/WeakHashSet.scala b/src/compiler/scala/tools/nsc/util/WeakHashSet.scala
index 6a10422b00..5bbb766e21 100644
--- a/src/compiler/scala/tools/nsc/util/WeakHashSet.scala
+++ b/src/compiler/scala/tools/nsc/util/WeakHashSet.scala
@@ -4,6 +4,7 @@ import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.collection.mutable.Builder
import scala.collection.mutable.SetBuilder
+import scala.collection.generic.Clearable
import scala.runtime.AbstractFunction1
/** A bare-bones implementation of a mutable `Set` that uses weak references
@@ -12,7 +13,7 @@ import scala.runtime.AbstractFunction1
* This implementation offers only add/remove/test operations,
* therefore it does not fulfill the contract of Scala collection sets.
*/
-class WeakHashSet[T <: AnyRef] extends AbstractFunction1[T, Boolean] {
+class WeakHashSet[T <: AnyRef] extends AbstractFunction1[T, Boolean] with Clearable {
private val underlying = mutable.HashSet[WeakReferenceWithEquals[T]]()
/** Add the given element to this set. */