summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-11-19 21:37:27 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-11-19 21:54:12 +0100
commit77ecff775efd6ec21730ebd478722260b0f6c6b3 (patch)
treefcf61047276a42ec68e5021864fac15dfad3b407 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parentc243435f113615b2f7407fbd683c93ec16c73749 (diff)
downloadscala-77ecff775efd6ec21730ebd478722260b0f6c6b3.tar.gz
scala-77ecff775efd6ec21730ebd478722260b0f6c6b3.tar.bz2
scala-77ecff775efd6ec21730ebd478722260b0f6c6b3.zip
SI-7985 Allow qualified type argument in patterns
We were considering the lower case `s` in `case _: Array[scala.Int]` as a sign that we were dealing with a type variable pattern. Now, we only do this if a lookahead confirms the absence of a the `.`
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala2
1 files changed, 1 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 ef4052d5f3..4e4a7738cb 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1774,7 +1774,7 @@ self =>
in.nextToken()
if (in.token == SUBTYPE || in.token == SUPERTYPE) wildcardType(start)
else atPos(start) { Bind(tpnme.WILDCARD, EmptyTree) }
- case IDENTIFIER if nme.isVariableName(in.name) =>
+ case IDENTIFIER if nme.isVariableName(in.name) && lookingAhead(in.token != DOT) =>
atPos(start) { Bind(identForType(), EmptyTree) }
case _ =>
typ()