aboutsummaryrefslogblamecommitdiff
path: root/tests/debug/for.scala
blob: b2287a988a233af6812d7ab997a7ad3f04d0c454 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                    
object Test {
  def main(args: Array[String]): Unit = {
     val b = 8 * 9  // [break] [step: f()]
     f()            // [step: val a]
     20 + b
     print(b)
  }

  def f(): Unit = {
    val a = for (i <- 1 to 5; j <- 10 to 20)        // [cont]
              yield (i, j)      // Error: incorrect reaching this line

    for (i <- 1 to 5; j <- 10 to 20)
      println(i + j)           // TODO: i is renamed to i$2 --> reduce debuggability
  }
}