RFR: 8036019: Insufficient alternatives listed in some errors produced by the parser

Vicente Romero vromero at openjdk.java.net
Tue Jan 18 17:31:30 UTC 2022


On Mon, 10 Jan 2022 18:53:35 GMT, Aggelos Biboudis <duke at openjdk.java.net> wrote:

> Adjusts the corresponding "expected-" errors for `argumentOpt`,  `typeArgumentsOpt` and `annotationValue`.

Changes requested by vromero (Reviewer).

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 3382:

> 3380:                 }
> 3381:             }
> 3382:             accept(RBRACE, tk -> Errors.AnnotationMissingElementValue);

I think that this method needs some more massage, annotations like this one are being accepted:


@SuppressWarnings({,})

even previous to your patch, if my reading of the spec is correct, there should be at least one `ElementValue`

-------------

PR: https://git.openjdk.java.net/jdk/pull/7019


More information about the compiler-dev mailing list