diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala | 2 | ||||
-rw-r--r-- | test/files/neg/bug1181.check | 2 | ||||
-rw-r--r-- | test/files/pos/bug756.scala | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala b/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala index ec5354c507..dfb0d2878f 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/NewScanners.scala @@ -717,7 +717,7 @@ trait NewScanners { } def inFirstOfStat(token: Int) = token match { case EOF | /*CASE |*/ CATCH | ELSE | EXTENDS | FINALLY | MATCH | REQUIRES | WITH | YIELD | - COMMA | SEMI | NEWLINE | NEWLINES | DOT | USCORE | COLON | EQUALS | ARROW | + COMMA | SEMI | NEWLINE | NEWLINES | DOT | COLON | EQUALS | ARROW | /* | USCORE - bug #756 */ LARROW | SUBTYPE | VIEWBOUND | SUPERTYPE | HASH | // todo: add LBRACKET RPAREN | RBRACKET | RBRACE => false case _ => true diff --git a/test/files/neg/bug1181.check b/test/files/neg/bug1181.check index 0baf975f9b..38045eda87 100644 --- a/test/files/neg/bug1181.check +++ b/test/files/neg/bug1181.check @@ -1,4 +1,4 @@ -bug1181.scala:9: error: not a legal formal parameter +bug1181.scala:9: error: missing parameter type _ => buildMap(map.update(keyList.head, valueList.head), keyList.tail, valueList.tail) ^ one error found diff --git a/test/files/pos/bug756.scala b/test/files/pos/bug756.scala new file mode 100644 index 0000000000..09735695f8 --- /dev/null +++ b/test/files/pos/bug756.scala @@ -0,0 +1,6 @@ +object test { + for { + n <- Some(42) + _ <- Some(24) + } yield n +}
\ No newline at end of file |