diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 3 | ||||
-rw-r--r-- | test/files/pos/bug3480.scala | 4 | ||||
-rw-r--r-- | test/pending/neg/bug3189.check (renamed from test/files/neg/bug3189.check) | 0 | ||||
-rw-r--r-- | test/pending/neg/bug3189.scala (renamed from test/files/neg/bug3189.scala) | 0 |
4 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 182ae6c21c..0bfee7cdd8 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1547,7 +1547,8 @@ self => var top = simplePattern(seqOK) // See ticket #3189 for the motivation for the null check. // TODO: dredge out the remnants of regexp patterns. - if (seqOK && isIdent && in.name == STAR && in.prev.name != null) + // ... and now this is back the way it was because it caused #3480. + if (seqOK && isIdent && in.name == STAR) return atPos(top.pos.startOrPoint, in.skipToken())(Star(stripParens(top))) while (isIdent && in.name != BAR) { diff --git a/test/files/pos/bug3480.scala b/test/files/pos/bug3480.scala new file mode 100644 index 0000000000..830365170b --- /dev/null +++ b/test/files/pos/bug3480.scala @@ -0,0 +1,4 @@ +object Test { + val List(_*) = List(1) + val Array( who, what @ _* ) = "Eclipse plugin cannot not handle this" split (" ") +} diff --git a/test/files/neg/bug3189.check b/test/pending/neg/bug3189.check index 520644fd43..520644fd43 100644 --- a/test/files/neg/bug3189.check +++ b/test/pending/neg/bug3189.check diff --git a/test/files/neg/bug3189.scala b/test/pending/neg/bug3189.scala index 4ea4bb7581..4ea4bb7581 100644 --- a/test/files/neg/bug3189.scala +++ b/test/pending/neg/bug3189.scala |