aboutsummaryrefslogtreecommitdiff
path: root/tests/debug/for.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/debug/for.scala')
-rw-r--r--tests/debug/for.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/debug/for.scala b/tests/debug/for.scala
new file mode 100644
index 000000000..b2287a988
--- /dev/null
+++ b/tests/debug/for.scala
@@ -0,0 +1,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
+ }
+} \ No newline at end of file