RFR: 8294943: Implement record patterns in enhanced for [v8]

Aggelos Biboudis abimpoudis at openjdk.org
Sat Nov 12 14:45:21 UTC 2022


On Fri, 11 Nov 2022 18:04:20 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This qualifies as a test case to add and a new bug to fix :D 
>> Good catch.
>> 
>> 
>> static <T> void method2(Function<Integer, Integer> f) {}
>> int i = 42;
>> for (method2((Integer a) -> 42); i == 0;) { i++; }
>
> Note also that a generic type might end with `>` - so `>` followed by an IDENT could also be a sign or a record (same as IDENT IDENT).

PR updated!

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

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


More information about the compiler-dev mailing list