summaryrefslogtreecommitdiff
path: root/test/files/pos/t2413
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-08-10 00:55:15 +0000
committerPaul Phillips <paulp@improving.org>2011-08-10 00:55:15 +0000
commit879e5af47db2ae6807aef26dd786e6ea920ac554 (patch)
tree7aecb05e2c9361689c16dec2a2c8473af6d0b4fd /test/files/pos/t2413
parente3e64e43659f53dd8f9cd5837f78a7e4378dc4c4 (diff)
downloadscala-879e5af47db2ae6807aef26dd786e6ea920ac554.tar.gz
scala-879e5af47db2ae6807aef26dd786e6ea920ac554.tar.bz2
scala-879e5af47db2ae6807aef26dd786e6ea920ac554.zip
Reversed the values of "is" and "is not" in rec...
Reversed the values of "is" and "is not" in recent for comprehension deprecation. DO NOT BLOW HATCH REPEAT DO NOT BLOW HATCH "Roger! Hatch blown." Events reveal it was all baby, no bathwater. It turns out that the specification is merely a document, not infallible holy writ as we had all previously believed. So it is not the ABSENCE of val in a for comprehension assignment which is deprecated, it is the PRESENCE of val. Summarizing again, more accurately perhaps: for (x <- 1 to 5 ; y = x) yield x+y // THAT's the one 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 (x <- 1 to 5 ; val y = x) yield x+y // deprecated No review.
Diffstat (limited to 'test/files/pos/t2413')
-rw-r--r--test/files/pos/t2413/TestScalac.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/pos/t2413/TestScalac.scala b/test/files/pos/t2413/TestScalac.scala
index 0f395e6c74..098e852dd7 100644
--- a/test/files/pos/t2413/TestScalac.scala
+++ b/test/files/pos/t2413/TestScalac.scala
@@ -18,6 +18,6 @@ class Foo extends TestJava {
val aVal = repeatParam("1","2","3") */
// THIS YIELDS TO CRASH
- for (a <- 1 to 4 ; val anotherVal = repeatParam("1","2","3"))
+ for (a <- 1 to 4 ; anotherVal = repeatParam("1","2","3"))
yield anotherVal
}