RFR: 8326204: yield statements doesn't allow cast expressions with more than 1 type arguments [v2]
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Mar 13 10:53:13 UTC 2024
On Mon, 11 Mar 2024 15:38:34 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java line 2897:
>
>> 2895: int balance = 1;
>> 2896: boolean hasComma = false;
>> 2897: boolean hasTypeArgs = false;
>
> For consideration, may also balance out the `<`/`>`, to cover cases like this:
>
> private static int t(int i) {
> yield((Map<String, String>) null, 2);
> }
>
> private static void yield(Map<String, String> m, int j) {
>
> }
>
>
> Not critical, as this is error recovery anyway, so for consideration only.
Addressed. Thanks @lahodaj
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18196#discussion_r1522993223
More information about the compiler-dev
mailing list