summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-12-30 23:02:44 -0800
committerPaul Phillips <paulp@improving.org>2011-12-31 07:01:12 -0800
commit008a781f49feb567833e9347ff9d293defeafe6d (patch)
tree26efcae8f28c0af70c236840e87de796ebe4b838 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parent82c793a438c7bd802daf96c8b2012f54fbd737ba (diff)
downloadscala-008a781f49feb567833e9347ff9d293defeafe6d.tar.gz
scala-008a781f49feb567833e9347ff9d293defeafe6d.tar.bz2
scala-008a781f49feb567833e9347ff9d293defeafe6d.zip
More uniformity for the parser.
Fixing consecutive type application made it more obvious there was another missing bit of the parser, type application following function application. This should (and now does) work: object F { def apply[T] = List[T]() } def g() = F g()[String]
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 00ac3976a9..db97dd3475 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -1533,12 +1533,12 @@ self =>
case LBRACKET =>
val t1 = stripParens(t)
t1 match {
- case Ident(_) | Select(_, _) =>
- var tapp: Tree = t1
+ case Ident(_) | Select(_, _) | Apply(_, _) =>
+ var app: Tree = t1
while (in.token == LBRACKET)
- tapp = atPos(tapp.pos.startOrPoint, in.offset)(TypeApply(tapp, exprTypeArgs()))
+ app = atPos(app.pos.startOrPoint, in.offset)(TypeApply(app, exprTypeArgs()))
- simpleExprRest(tapp, true)
+ simpleExprRest(app, true)
case _ =>
t1
}