summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala4
1 files changed, 3 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 868a8c0dd4..8e9af3c341 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1486,7 +1486,9 @@ self =>
def pattern3(seqOK: Boolean): Tree = {
val base = opstack
var top = simplePattern(seqOK)
- if (seqOK && isIdent && in.name == STAR)
+ // 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)
return atPos(top.pos.startOrPoint, in.skipToken())(Star(stripParens(top)))
while (isIdent && in.name != BAR) {