Skip to content

Commit b1a9959

Browse files
smarterDarkDimius
authored andcommitted
Make immutable.Set#parCombiner object-protected
This matches every other override of parCombiner in the library and is necessary to avoid the following variance issue detected by dotty: src/library/scala/collection/immutable/Set.scala:41: error: covariant type A occurs in contravariant position in type => scala.collection.parallel.Combiner[A, scala.collection.parallel.immutable.ParSet[A]] of method parCombiner
1 parent 922af5e commit b1a9959

File tree

1 file changed

+1
-1
lines changed
  • src/library/scala/collection/immutable

1 file changed

+1
-1
lines changed

src/library/scala/collection/immutable/Set.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ trait Set[A] extends Iterable[A]
3838
override def toSet[B >: A]: Set[B] = to[({type l[a] = immutable.Set[B]})#l] // for bincompat; remove in dev
3939

4040
override def seq: Set[A] = this
41-
protected override def parCombiner = ParSet.newCombiner[A] // if `immutable.SetLike` gets introduced, please move this there!
41+
protected[this] override def parCombiner = ParSet.newCombiner[A] // if `immutable.SetLike` gets introduced, please move this there!
4242
}
4343

4444
/** $factoryInfo

0 commit comments

Comments
 (0)