RFR: 8273408: java.lang.AssertionError: typeSig ERROR on generated class property of record

Guoxiong Li gli at openjdk.java.net
Tue Sep 14 17:50:38 UTC 2021


Hi all,

After processing annotation, if new source files are generated, the compiler should re-parse and re-enter the source files so that the type and symbol can keep right. The compiler always holds this convention in the past. But when the feature `record` is added, the convention is broken. In this bug, the compiler doesn't  catch or enter the new/good type for record component after processing annotation. So some issues may occur at the later phases.

This patch fixes the type of the record component so that the phases `Gen` and `ClassWriter` can get the right type. And a test case is added.

Thanks for taking the time to review.

Best Regards,
-- Guoxiong

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

Commit messages:
 - Polish
 - 8273408: java.lang.AssertionError: typeSig ERROR on generated class property of record

Changes: https://git.openjdk.java.net/jdk/pull/5511/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5511&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273408
  Stats: 109 lines in 3 files changed: 107 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5511.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5511/head:pull/5511

PR: https://git.openjdk.java.net/jdk/pull/5511


More information about the compiler-dev mailing list