diff options
author | Paul Phillips <paulp@improving.org> | 2010-06-04 02:39:10 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-06-04 02:39:10 +0000 |
commit | 09f490bd56a44dd9084f2ea843ac954a586e6d32 (patch) | |
tree | c39191d15c5ea7580b7dce9def34ca5fbe35b0e7 | |
parent | bf17437453a72c1bad87cd4f5f6555b0beaee783 (diff) | |
download | scala-09f490bd56a44dd9084f2ea843ac954a586e6d32.tar.gz scala-09f490bd56a44dd9084f2ea843ac954a586e6d32.tar.bz2 scala-09f490bd56a44dd9084f2ea843ac954a586e6d32.zip |
Reverts r21973, the patch I characterized as "h...
Reverts r21973, the patch I characterized as "hacky but no-risk" in my
commit message, for causing #3480. Closes #3480. I'd say no review but
who can trust a guy who throws around "no risk" with such abandon.
-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 |