RFR: 8290379: Parse error with parenthesized pattern and guard using an array [v2]

Aggelos Biboudis abimpoudis at openjdk.org
Mon Jul 18 15:34:48 UTC 2022


On Mon, 18 Jul 2022 15:02:25 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> Aggelos Biboudis has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>> 
>>   8290379: Parse error with parenthesized pattern and guard using an array
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 3173:
> 
>> 3171:                     } else {
>> 3172:                         // This is a potential guard, if we are already in a pattern
>> 3173:                         return pendingResult == PatternResult.PATTERN
> 
> Why not simply `return pendingResult;`?

Good question! 🙈

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

PR: https://git.openjdk.org/jdk/pull/9519


More information about the compiler-dev mailing list