Skip to content

Commit 97ed7ab

Browse files
committed
SymDenotations: do not use deprecated BitSet#toImmutable
As explained in the deprecated message: "method toImmutable in class BitSet is deprecated: If this BitSet contains a value that is 128 or greater, the result of this method is an 'immutable' BitSet that shares state with this mutable BitSet. Thus, if the mutable BitSet is modified, it will violate the immutability of the result"
1 parent 1a9f7f9 commit 97ed7ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Types._, Flags._, Decorators._, DenotTransformers._, StdNames._, Scopes._
77
import NameOps._, NameKinds._
88
import Scopes.Scope
99
import collection.mutable
10-
import collection.immutable.BitSet
10+
import collection.BitSet
1111
import scala.reflect.io.AbstractFile
1212
import Decorators.SymbolIteratorDecorator
1313
import ast._
@@ -1412,7 +1412,7 @@ object SymDenotations {
14121412
to
14131413
}
14141414
val bcs = classSymbol :: addParentBaseClasses(classParents, Nil)
1415-
val scbits = seen.toImmutable
1415+
val scbits = seen
14161416
if (isFullyCompleted) {
14171417
myBaseClasses = bcs
14181418
mySuperClassBits = scbits

0 commit comments

Comments
 (0)