Skip to content

Commit 47ebc1d

Browse files
committed
Suppress some spurious unchecked warnings
The warning is invalid but Scalac can't tell.
1 parent 1aa798a commit 47ebc1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/strawman/collections/CollectionStrawMan4.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ object CollectionStrawMan4 {
216216

217217
object ListBuffer extends IterableFactory[ListBuffer] {
218218
def fromIterable[B](coll: Iterable[B]): ListBuffer[B] = coll match {
219-
case pd @ View.Partitioned(partition: View.Partition[B]) =>
219+
case pd @ View.Partitioned(partition: View.Partition[B] @unchecked) =>
220220
partition.distribute(new ListBuffer[B]())
221221
new ListBuffer[B] ++= pd.forced.get
222222
case _ =>
@@ -267,7 +267,7 @@ object CollectionStrawMan4 {
267267
Array.copy(fst.elems, fst.start, elems, 0, fst.length)
268268
Array.copy(snd.elems, snd.start, elems, fst.length, snd.length)
269269
new ArrayBuffer(elems, elems.length)
270-
case pd @ View.Partitioned(partition: View.Partition[B]) =>
270+
case pd @ View.Partitioned(partition: View.Partition[B] @unchecked) =>
271271
partition.distribute(new ArrayBuffer[B]())
272272
pd.forced.get.asInstanceOf[ArrayBuffer[B]]
273273
case c if c.knownLength >= 0 =>

0 commit comments

Comments
 (0)