diff options
author | Rex Kerr <ichoran@gmail.com> | 2015-08-30 17:50:26 -0700 |
---|---|---|
committer | Rex Kerr <ichoran@gmail.com> | 2015-08-30 17:50:26 -0700 |
commit | 2c5199520b1c89a6b1e2bfbc734d0ceb620723a1 (patch) | |
tree | f3c787105e3386201d8f53ea0560d09b4b3e9f58 /test/junit | |
parent | 4f35ab77e6b4456025facc63297e7f2e93c2b9d0 (diff) | |
download | scala-2c5199520b1c89a6b1e2bfbc734d0ceb620723a1.tar.gz scala-2c5199520b1c89a6b1e2bfbc734d0ceb620723a1.tar.bz2 scala-2c5199520b1c89a6b1e2bfbc734d0ceb620723a1.zip |
SI-8647 Used immutable scheme for mutable.BitSet to resolve canBuildFrom
mutable.BitSet had a conflict between its own implicit canBuildFrom and the one inherited from SortedSetFactory in mutable.SortedSet.
The immutable hierarchy already had a workaround; this just copies it on the mutable side.
Test written to verify compilation.
Diffstat (limited to 'test/junit')
-rw-r--r-- | test/junit/scala/collection/mutable/BitSetTest.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/junit/scala/collection/mutable/BitSetTest.scala b/test/junit/scala/collection/mutable/BitSetTest.scala index d56cc45601..e832194989 100644 --- a/test/junit/scala/collection/mutable/BitSetTest.scala +++ b/test/junit/scala/collection/mutable/BitSetTest.scala @@ -28,4 +28,11 @@ class BitSetTest { littleBitSet &= bigBitSet assert(littleBitSet.toBitMask.length < bigBitSet.toBitMask.length, "Needlessly extended the size of bitset on &=") } + + @Test def test_SI8647() { + val bs = BitSet() + bs.map(_ + 1) // Just needs to compile + val xs = bs: SortedSet[Int] + xs.map(_ + 1) // Also should compile (did before) + } } |