aboutsummaryrefslogtreecommitdiff
path: root/tests/debug/for.scala
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-02-09 17:24:47 +0100
committerliu fengyun <liu@fengy.me>2017-02-10 19:26:07 +0100
commitc7a557c43221c1fbad4117e63b6cd8c255ddc8f7 (patch)
treed9caf39c785e5b800553aea3f34a59a98064b68f /tests/debug/for.scala
parent22056d080e29e53bccd1b1b1ba9ffa2cbe8d0c64 (diff)
downloaddotty-c7a557c43221c1fbad4117e63b6cd8c255ddc8f7.tar.gz
dotty-c7a557c43221c1fbad4117e63b6cd8c255ddc8f7.tar.bz2
dotty-c7a557c43221c1fbad4117e63b6cd8c255ddc8f7.zip
add more debug files to the tests
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