aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t3273.scala
blob: 379a8a29c11b76f57dcfdecf0ed7d71bf597d027 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
object Test {
  val num1: Stream[Int] = 1 #:: num1.map(_ + 1)
  val num2: Stream[Int] = 1 #:: num2.iterator.map(_ + 1).toStream

  def main(args: Array[String]): Unit = {
    val x1 = (num1 take 10).toList
    val x2 = (num2 take 10).toList
    assert(x1 == x2)
  }
}