-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream
created with fromIterator
looping infinitely when evaluated in 3.10.x
#3415
Labels
Comments
Maybe related? #3392 |
Yep, that's the cause: scala> val i = Vector(1, 2).iterator
val i: Iterator[Int] = <iterator>
scala> i.take(5).toVector
val res0: Vector[Int] = Vector(1, 2)
scala> i.take(5).toVector
val res1: Vector[Int] = Vector(1, 2)
scala> i.take(5).toVector
val res2: Vector[Int] = Vector(1, 2) |
Here's a fun one: scala> val i = Vector(1, 2).iterator; i.take(5).toList; i.take(5).toList
val i: Iterator[Int] = <iterator>
val res0: List[Int] = List(1, 2)
val res1: List[Int] = List()
scala> val i = Vector(1, 2).iterator; i.take(5).toVector; i.take(5).toVector
val i: Iterator[Int] = <iterator>
val res2: Vector[Int] = Vector(1, 2)
val res3: Vector[Int] = Vector(1, 2) |
mpilquist
added a commit
that referenced
this issue
Mar 28, 2024
mpilquist
added a commit
that referenced
this issue
Mar 28, 2024
Fix #3415 - fromIterator looping infinitely
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
3.10.1: https://scastie.scala-lang.org/MPJYpbXjTvifxeJztJf2fg
3.10.0: https://scastie.scala-lang.org/HeqY0ewsQ9acwk4PcfS2Rw
3.9.4 (expected behavior): https://scastie.scala-lang.org/qjLFGGvHQPKRe8GDrpaDKw
The text was updated successfully, but these errors were encountered: