mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8225054: Compiler implementation for records
8225052: javax.lang.model support for records 8225053: Preview APIs support for records 8225055: Javadoc for records 8226314: com.sun.source support for records 8227113: Specification for java.lang.Record 8233526: JVM support for records Implement records in the compiler and the JVM, including serialization, reflection and APIs support Co-authored-by: Brian Goetz <brian.goetz@oracle.com> Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com> Co-authored-by: Harold Seigel <harold.seigel@oracle.com> Co-authored-by: Joe Darcy <joe.darcy@oracle.com> Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com> Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com> Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com> Reviewed-by: mcimadamore, briangoetz, alanb, darcy, chegar, jrose, jlahoda, coleenp, dholmes, lfoltan, mchung, sadayapalam, hannesw, sspitsyn
This commit is contained in:
parent
0a375cfa2d
commit
827e5e3226
351 changed files with 24958 additions and 6395 deletions
|
@ -102,8 +102,21 @@ public class JavacTreeScannerTest extends AbstractTreeScannerTest {
|
|||
|
||||
error(sourcefile, "differences found");
|
||||
|
||||
if (found.size() != expect.size())
|
||||
if (found.size() != expect.size()) {
|
||||
error("Size mismatch; found: " + found.size() + ", expected: " + expect.size());
|
||||
Set<JCTree> notFound = new HashSet<>(expect);
|
||||
notFound.removeAll(found);
|
||||
if (!notFound.isEmpty()) {
|
||||
System.err.println("found by reflective access to the AST, but not found in the scanner API:");
|
||||
notFound.forEach(t -> System.err.println(trim(t, 64)));
|
||||
}
|
||||
Set<JCTree> notExpected = new HashSet<>(found);
|
||||
notExpected.removeAll(expect);
|
||||
if (!notExpected.isEmpty()) {
|
||||
System.err.println("found in the scanner API, but not found by reflective access to the AST:");
|
||||
notExpected.forEach(t -> System.err.println(trim(t, 64)));
|
||||
}
|
||||
}
|
||||
|
||||
Set<JCTree> missing = new HashSet<JCTree>();
|
||||
missing.addAll(expect);
|
||||
|
@ -150,6 +163,8 @@ public class JavacTreeScannerTest extends AbstractTreeScannerTest {
|
|||
List<?> list = (List<?>) o;
|
||||
for (Object item: list)
|
||||
reflectiveScan(item);
|
||||
} else if (o instanceof Pair) {
|
||||
return;
|
||||
} else
|
||||
error("unexpected item: " + o);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue