2cb64a7557
8296802: Parse errors when deconstructing a record using the enhanced for loop of JEP 432 Co-authored-by: Jan Lahoda <jlahoda@openjdk.org> Co-authored-by: Aggelos Biboudis <abimpoudis@openjdk.org> Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org> Reviewed-by: mcimadamore, vromero
12 lines
275 B
Java
12 lines
275 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @summary
|
|
* @enablePreview
|
|
* @compile -XDfind=all ForEachTestAllAnalyzers.java
|
|
*/
|
|
public class ForEachTestAllAnalyzers {
|
|
private void test(Iterable<? extends R> l) {
|
|
for (R(Object a) : l) { }
|
|
}
|
|
record R(Object a) {}
|
|
} |