From 8b28292b5379a34fad0599335116b9e54ee44e20 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 8 Aug 2011 06:56:21 +0000 Subject: 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. --- test/files/neg/for-comprehension-old.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/neg/for-comprehension-old.scala (limited to 'test/files/neg/for-comprehension-old.scala') 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 +} -- cgit v1.2.3