summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}