@@ -783,7 +783,8 @@ object Parsers {
783783 refinedTypeRest(
784784 withTypeRest(
785785 annotTypeRest(
786- simpleTypeRest(tuple)))))
786+ appliedTypeRest(
787+ simpleTypeRest(tuple))))))
787788 }
788789 }
789790 }
@@ -846,14 +847,20 @@ object Parsers {
846847 }
847848 else t
848849
849- /** AnnotType ::= SimpleType {Annotation}
850+ /** AnnotType ::= AppliedType {Annotation}
850851 */
851- def annotType (): Tree = annotTypeRest(simpleType ())
852+ def annotType (): Tree = annotTypeRest(appliedType ())
852853
853854 def annotTypeRest (t : Tree ): Tree =
854855 if (in.token == AT ) annotTypeRest(atPos(startOffset(t)) { Annotated (t, annot()) })
855856 else t
856857
858+ /** AppiedType ::= SimpleType {ParArgumentExprs}
859+ */
860+ def appliedType (): Tree = appliedTypeRest(simpleType())
861+
862+ def appliedTypeRest (t : Tree ) = parArgumentExprss(t)
863+
857864 /** SimpleType ::= SimpleType TypeArgs
858865 * | SimpleType `#' id
859866 * | StableId
@@ -2312,11 +2319,11 @@ object Parsers {
23122319
23132320/* -------- TEMPLATES ------------------------------------------- */
23142321
2315- /** ConstrApp ::= SimpleType {ParArgumentExprs}
2322+ /** ConstrApp ::= SimpleType {Annotation} { ParArgumentExprs}
23162323 */
23172324 val constrApp = () => {
23182325 // Using Ident(nme.ERROR) to avoid causing cascade errors on non-user-written code
2319- val t = checkWildcard(annotType( ), fallbackTree = Ident (nme.ERROR ))
2326+ val t = checkWildcard(annotTypeRest(simpleType() ), fallbackTree = Ident (nme.ERROR ))
23202327 if (in.token == LPAREN ) parArgumentExprss(wrapNew(t))
23212328 else t
23222329 }
0 commit comments