Skip to content

Commit 59dd742

Browse files
committed
Convert BitSet.toSet
Fix compiler error with Scala 2.13 collections rewrite: ambiguous reference to overloaded definition, both method map in trait StrictOptimizedIterableOps of type [B](f: Int => B)scala.collection.immutable.Set[B] and method map in trait SortedSetOps of type [B](f: Int => B)(implicit evidence$4: Ordering[B])scala.collection.immutable.SortedSet[B] match argument types (Int => scala.collection.immutable.BitSet) (Q map f).foldLeft(immutable.BitSet.empty)(_ ++ _) ^
1 parent 562ea83 commit 59dd742

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared/src/main/scala/scala/xml/dtd/impl/NondetWordAutom.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private[dtd] abstract class NondetWordAutom[T <: AnyRef] {
4848
def nextDefault(Q: immutable.BitSet): immutable.BitSet = next(Q, default)
4949

5050
private def next(Q: immutable.BitSet, f: (Int) => immutable.BitSet): immutable.BitSet =
51-
(Q map f).foldLeft(immutable.BitSet.empty)(_ ++ _)
51+
Q.toSet.map(f).foldLeft(immutable.BitSet.empty)(_ ++ _)
5252

5353
private def finalStates = 0 until nstates filter isFinal
5454
override def toString = {

0 commit comments

Comments
 (0)