Skip to content

Commit 34b312b

Browse files
committed
Fix parsing of annotations
1 parent 54bc59a commit 34b312b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2846,11 +2846,11 @@ object Parsers {
28462846
else tree1
28472847
}
28482848

2849-
/** Annotation ::= `@' SimpleType {ParArgumentExprs}
2849+
/** Annotation ::= `@' SimpleType1 {ParArgumentExprs}
28502850
*/
28512851
def annot(): Tree =
28522852
adjustStart(accept(AT)) {
2853-
ensureApplied(parArgumentExprss(wrapNew(simpleType())))
2853+
ensureApplied(parArgumentExprss(wrapNew(simpleType1())))
28542854
}
28552855

28562856
def annotations(skipNewLines: Boolean = false): List[Tree] = {

docs/docs/internals/syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ LocalModifier ::= ‘abstract’
341341
AccessModifier ::= (‘private’ | ‘protected’) [AccessQualifier]
342342
AccessQualifier ::= ‘[’ id ‘]’
343343
344-
Annotation ::= ‘@’ SimpleType {ParArgumentExprs} Apply(tpe, args)
344+
Annotation ::= ‘@’ SimpleType1 {ParArgumentExprs} Apply(tpe, args)
345345
346346
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
347347
ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpec Import(expr, sels)

0 commit comments

Comments
 (0)