diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-08 06:56:21 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-08 06:56:21 +0000 |
commit | 8b28292b5379a34fad0599335116b9e54ee44e20 (patch) | |
tree | 654c93a14a26e802948aa80664efb7aea7b448d3 /test/files/neg/for-comprehension-old.scala | |
parent | be31934db38a93468b6390e783ca377da6283c19 (diff) | |
download | scala-8b28292b5379a34fad0599335116b9e54ee44e20.tar.gz scala-8b28292b5379a34fad0599335116b9e54ee44e20.tar.bz2 scala-8b28292b5379a34fad0599335116b9e54ee44e20.zip |
Fixing all the tests and source which still use...
Fixing all the tests and source which still use the old for
comprehension syntax with vals where there are no vals and no vals where
there are vals. No review.
Diffstat (limited to 'test/files/neg/for-comprehension-old.scala')
-rw-r--r-- | test/files/neg/for-comprehension-old.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/for-comprehension-old.scala b/test/files/neg/for-comprehension-old.scala new file mode 100644 index 0000000000..476e99808e --- /dev/null +++ b/test/files/neg/for-comprehension-old.scala @@ -0,0 +1,11 @@ +class A { + for (x <- 1 to 5 ; y = x) yield x+y // fail + for (x <- 1 to 5 ; val y = x) yield x+y // ok + for (val x <- 1 to 5 ; y = x) yield x+y // fail + for (val x <- 1 to 5 ; val y = x) yield x+y // fail + + for (z <- 1 to 2 ; x <- 1 to 5 ; y = x) yield x+y // fail + for (z <- 1 to 2 ; x <- 1 to 5 ; val y = x) yield x+y // ok + for (z <- 1 to 2 ; val x <- 1 to 5 ; y = x) yield x+y // fail + for (z <- 1 to 2 ; val x <- 1 to 5 ; val y = x) yield x+y // fail +} |