@@ -893,7 +893,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
893
893
* part of the result, but any following occurrences will.
894
894
*/
895
895
def diff [B >: A ](that : Seq [B ]): C = {
896
- val occ = occCounts(that)
896
+ val occ = occCounts[ B @ uncheckedCaptures] (that)
897
897
fromSpecific(iterator.filter { x =>
898
898
var include = false
899
899
occ.updateWith(x) {
@@ -918,7 +918,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
918
918
* in the result, but any following occurrences will be omitted.
919
919
*/
920
920
def intersect [B >: A ](that : Seq [B ]): C = {
921
- val occ = occCounts(that)
921
+ val occ = occCounts[ B @ uncheckedCaptures] (that)
922
922
fromSpecific(iterator.filter { x =>
923
923
var include = true
924
924
occ.updateWith(x) {
@@ -966,7 +966,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
966
966
iterableFactory.from(new View .Updated (this , index, elem))
967
967
}
968
968
969
- protected [collection] def occCounts [B ](sq : Seq [B ]): mutable.Map [B , Int ] = {
969
+ protected [collection] def occCounts [sealed B ](sq : Seq [B ]): mutable.Map [B , Int ] = {
970
970
val occ = new mutable.HashMap [B , Int ]()
971
971
for (y <- sq) occ.updateWith(y) {
972
972
case None => Some (1 )
0 commit comments