From 879e5af47db2ae6807aef26dd786e6ea920ac554 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 10 Aug 2011 00:55:15 +0000 Subject: 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. --- test/files/positions/Unpositioned1.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/positions') diff --git a/test/files/positions/Unpositioned1.scala b/test/files/positions/Unpositioned1.scala index 7fc520e93c..174db901da 100644 --- a/test/files/positions/Unpositioned1.scala +++ b/test/files/positions/Unpositioned1.scala @@ -1,3 +1,3 @@ object Unpositioned1 { - for (a <- Some("foo") ; val b = true) {} + for (a <- Some("foo") ; b = true) {} } -- cgit v1.2.3