aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8153.scala
blob: 0cbfb5b5a6cfbdee404c9239eea8c0ae87ac2c4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
object Test {
  def f() = {
    val lb = scala.collection.mutable.ListBuffer[Int](1, 2)
    val it = lb.iterator
    if (it.hasNext) it.next
    val xs = lb.toList
    lb += 3
    it.mkString
  }

  def main(args: Array[String]): Unit = {
    println(f())
  }
}