Skip to content

Commit 2cc5d36

Browse files
committed
Add HashSet to stdlib
1 parent dc31c5f commit 2cc5d36

File tree

4 files changed

+460
-3
lines changed

4 files changed

+460
-3
lines changed

tests/pos-special/stdlib/collection/Iterator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ trait Iterator[+A] extends IterableOnce[A] with IterableOnceOps[A, Iterator, Ite
562562
*/
563563
def distinctBy[B](f: A -> B): Iterator[A]^{this} = new AbstractIterator[A] {
564564

565-
private[this] val traversedValues = mutable.HashSet.empty[B]
565+
private[this] val traversedValues = mutable.HashSet.empty[B @uncheckedCaptures]
566566
private[this] var nextElementDefined: Boolean = false
567567
private[this] var nextElement: A = _
568568

tests/pos-special/stdlib/collection/StrictOptimizedSeqOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ trait StrictOptimizedSeqOps [+A, +CC[_], +C]
2525

2626
override def distinctBy[B](f: A -> B): C = {
2727
val builder = newSpecificBuilder
28-
val seen = mutable.HashSet.empty[B]
28+
val seen = mutable.HashSet.empty[B @uncheckedCaptures]
2929
val it = this.iterator
3030
while (it.hasNext) {
3131
val next = it.next()

0 commit comments

Comments
 (0)