Skip to content

Commit e1acbb2

Browse files
authored
Merge pull request scala/scala#10558 from som-snytt/sd/854-flaky-iterator-test
Flaky IteratorTest bails not fails
2 parents c8f5d20 + b3fffd7 commit e1acbb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/collection/Iterator.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ trait Iterator[+A] extends IterableOnce[A] with IterableOnceOps[A, Iterator, Ite
589589
/** Trillium logic boolean: -1 = unknown, 0 = false, 1 = true */
590590
private[this] var _hasNext: Int = -1
591591

592-
private[this] def nextCur(): Unit = {
593-
cur = null
592+
def nextCur(): Unit = {
593+
cur = Iterator.empty
594594
cur = f(self.next()).iterator
595595
_hasNext = -1
596596
}

0 commit comments

Comments
 (0)