@@ -24,9 +24,8 @@ import scala.collection.mutable.GrowableBuilder
2424import scala .util .Try
2525import scala .util .hashing .Hashing
2626import language .experimental .captureChecking
27- import caps .unsafe .unsafeAssumePure
2827
29- private [collection] final class INode [sealed K , sealed V ](bn : MainNode [K , V ], g : Gen , equiv : Equiv [K ]) extends INodeBase [K , V ](g) {
28+ private [collection] final class INode [K , V ](bn : MainNode [K , V ], g : Gen , equiv : Equiv [K ]) extends INodeBase [K , V ](g) {
3029 import INodeBase ._
3130
3231 WRITE (bn)
@@ -429,15 +428,15 @@ private[concurrent] object INode {
429428 final val KEY_ABSENT = new AnyRef
430429 final val KEY_PRESENT_OR_ABSENT = new AnyRef
431430
432- def newRootNode [sealed K , sealed V ](equiv : Equiv [K ]) = {
431+ def newRootNode [K , V ](equiv : Equiv [K ]) = {
433432 val gen = new Gen
434433 val cn = new CNode [K , V ](0 , new Array (0 ), gen)
435434 new INode [K , V ](cn, gen, equiv)
436435 }
437436}
438437
439438
440- private [concurrent] final class FailedNode [sealed K , sealed V ](p : MainNode [K , V ]) extends MainNode [K , V ] {
439+ private [concurrent] final class FailedNode [K , V ](p : MainNode [K , V ]) extends MainNode [K , V ] {
441440 WRITE_PREV (p)
442441
443442 def string (lev : Int ) = throw new UnsupportedOperationException
@@ -450,12 +449,12 @@ private[concurrent] final class FailedNode[sealed K, sealed V](p: MainNode[K, V]
450449}
451450
452451
453- private [concurrent] trait KVNode [sealed K , sealed V ] {
452+ private [concurrent] trait KVNode [K , V ] {
454453 def kvPair : (K , V )
455454}
456455
457456
458- private [collection] final class SNode [sealed K , sealed V ](final val k : K , final val v : V , final val hc : Int )
457+ private [collection] final class SNode [K , V ](final val k : K , final val v : V , final val hc : Int )
459458 extends BasicNode with KVNode [K , V ] {
460459 def copy = new SNode (k, v, hc)
461460 def copyTombed = new TNode (k, v, hc)
@@ -465,7 +464,7 @@ private[collection] final class SNode[sealed K, sealed V](final val k: K, final
465464}
466465
467466// Tomb Node, used to ensure proper ordering during removals
468- private [collection] final class TNode [sealed K , sealed V ](final val k : K , final val v : V , final val hc : Int )
467+ private [collection] final class TNode [K , V ](final val k : K , final val v : V , final val hc : Int )
469468 extends MainNode [K , V ] with KVNode [K , V ] {
470469 def copy = new TNode (k, v, hc)
471470 def copyTombed = new TNode (k, v, hc)
@@ -477,7 +476,7 @@ private[collection] final class TNode[sealed K, sealed V](final val k: K, final
477476}
478477
479478// List Node, leaf node that handles hash collisions
480- private [collection] final class LNode [sealed K , sealed V ](val entries : List [(K , V )], equiv : Equiv [K ])
479+ private [collection] final class LNode [K , V ](val entries : List [(K , V )], equiv : Equiv [K ])
481480 extends MainNode [K , V ] {
482481
483482 def this (k : K , v : V , equiv : Equiv [K ]) = this ((k -> v) :: Nil , equiv)
@@ -519,7 +518,7 @@ private[collection] final class LNode[sealed K, sealed V](val entries: List[(K,
519518}
520519
521520// Ctrie Node, contains bitmap and array of references to branch nodes
522- private [collection] final class CNode [sealed K , sealed V ](val bitmap : Int , val array : Array [BasicNode ], val gen : Gen ) extends CNodeBase [K , V ] {
521+ private [collection] final class CNode [K , V ](val bitmap : Int , val array : Array [BasicNode ], val gen : Gen ) extends CNodeBase [K , V ] {
523522 // this should only be called from within read-only snapshots
524523 def cachedSize (ct : AnyRef ): Int = {
525524 val currsz = READ_SIZE ()
@@ -655,7 +654,7 @@ private[collection] final class CNode[sealed K, sealed V](val bitmap: Int, val a
655654
656655private [concurrent] object CNode {
657656
658- def dual [sealed K , sealed V ](x : SNode [K , V ], xhc : Int , y : SNode [K , V ], yhc : Int , lev : Int , gen : Gen , equiv : Equiv [K ]): MainNode [K , V ] = if (lev < 35 ) {
657+ def dual [K , V ](x : SNode [K , V ], xhc : Int , y : SNode [K , V ], yhc : Int , lev : Int , gen : Gen , equiv : Equiv [K ]): MainNode [K , V ] = if (lev < 35 ) {
659658 val xidx = (xhc >>> lev) & 0x1f
660659 val yidx = (yhc >>> lev) & 0x1f
661660 val bmp = (1 << xidx) | (1 << yidx)
@@ -690,7 +689,7 @@ private[concurrent] case class RDCSS_Descriptor[K, V](old: INode[K, V], expected
690689 * For details, see: [[http://lampwww.epfl.ch/~prokopec/ctries-snapshot.pdf ]]
691690 */
692691@ SerialVersionUID (- 5212455458703321708L )
693- final class TrieMap [sealed K , sealed V ] private (r : AnyRef , rtupd : AtomicReferenceFieldUpdater [TrieMap [K , V ], AnyRef ], hashf : Hashing [K ], ef : Equiv [K ])
692+ final class TrieMap [K , V ] private (r : AnyRef , rtupd : AtomicReferenceFieldUpdater [TrieMap [K , V ], AnyRef ], hashf : Hashing [K ], ef : Equiv [K ])
694693 extends scala.collection.mutable.AbstractMap [K , V ]
695694 with scala.collection.concurrent.Map [K , V ]
696695 with scala.collection.mutable.MapOps [K , V , TrieMap , TrieMap [K , V ]]
@@ -1043,11 +1042,11 @@ final class TrieMap[sealed K, sealed V] private (r: AnyRef, rtupd: AtomicReferen
10431042@ SerialVersionUID (3L )
10441043object TrieMap extends MapFactory [TrieMap ] {
10451044
1046- def empty [sealed K , sealed V ]: TrieMap [K , V ] = new TrieMap [K , V ]
1045+ def empty [K , V ]: TrieMap [K , V ] = new TrieMap [K , V ]
10471046
1048- def from [sealed K , sealed V ](it : IterableOnce [(K , V )]^ ): TrieMap [K , V ] = new TrieMap [K , V ]() ++= it
1047+ def from [K , V ](it : IterableOnce [(K , V )]^ ): TrieMap [K , V ] = new TrieMap [K , V ]() ++= it
10491048
1050- def newBuilder [sealed K , sealed V ]: mutable.GrowableBuilder [(K , V ), TrieMap [K , V ]] = new GrowableBuilder (empty[K , V ])
1049+ def newBuilder [K , V ]: mutable.GrowableBuilder [(K , V ), TrieMap [K , V ]] = new GrowableBuilder (empty[K , V ])
10511050
10521051 @ transient
10531052 val inodeupdater : AtomicReferenceFieldUpdater [INodeBase [_, _], MainNode [_, _]] = AtomicReferenceFieldUpdater .newUpdater(classOf [INodeBase [_, _]], classOf [MainNode [_, _]], " mainnode" )
@@ -1071,7 +1070,7 @@ object TrieMap extends MapFactory[TrieMap] {
10711070}
10721071
10731072// non-final as an extension point for parallel collections
1074- private [collection] class TrieMapIterator [sealed K , sealed V ](var level : Int , private var ct : TrieMap [K , V ], mustInit : Boolean = true ) extends AbstractIterator [(K , V )] {
1073+ private [collection] class TrieMapIterator [K , V ](var level : Int , private var ct : TrieMap [K , V ], mustInit : Boolean = true ) extends AbstractIterator [(K , V )] {
10751074 private val stack = new Array [Array [BasicNode ]](7 )
10761075 private val stackpos = new Array [Int ](7 )
10771076 private var depth = - 1
0 commit comments