summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-14 16:55:13 +0000
committerPaul Phillips <paulp@improving.org>2011-05-14 16:55:13 +0000
commitce5170fe023fd2a6cef0f2f576ea57b14eb717e5 (patch)
treee773a4eaca9456e591fe94322221f33aaba9ef03 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parent11ebee09918841b5b4175b60399af4e04fade833 (diff)
downloadscala-ce5170fe023fd2a6cef0f2f576ea57b14eb717e5.tar.gz
scala-ce5170fe023fd2a6cef0f2f576ea57b14eb717e5.tar.bz2
scala-ce5170fe023fd2a6cef0f2f576ea57b14eb717e5.zip
Removes long-deprecated "for (val x <- ...
it's clearly time, but review by odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 84959d04ac..086b72be56 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1569,20 +1569,12 @@ self =>
* | val Pattern1 `=' Expr
*/
def enumerators(): List[Enumerator] = {
- val newStyle = in.token != VAL
- if (!newStyle)
- deprecationWarning(in.offset, "for (val x <- ... ) has been deprecated; use for (x <- ... ) instead")
val enums = new ListBuffer[Enumerator]
generator(enums, false)
while (isStatSep) {
in.nextToken()
- if (newStyle) {
- if (in.token == IF) enums += makeFilter(in.offset, guard())
- else generator(enums, true)
- } else {
- if (in.token == VAL) generator(enums, true)
- else enums += makeFilter(in.offset, expr())
- }
+ if (in.token == IF) enums += makeFilter(in.offset, guard())
+ else generator(enums, true)
}
enums.toList
}