RFR: 7903612: Nested struct typedefs fail to compile

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Dec 15 10:23:30 UTC 2023


This PR fixes a small issue with nested struct typedef, and another with typedef in general:

* nested struct classes are emitted with the `final` modifier, which prevents them from being subclassed (e.g. in typedefs)
* all structs have a private constructor to prevent clients from instantiating. Unfortunately this constructor also prevents subclassing (e.g. in typedef).

This patch drops the `final` modifier on nested struct/unions, and also tweaks the default constructor from `private` to `protected`.

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

Commit messages:
 - Initial push

Changes: https://git.openjdk.org/jextract/pull/164/files
 Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=164&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903612
  Stats: 74 lines in 6 files changed: 61 ins; 6 del; 7 mod
  Patch: https://git.openjdk.org/jextract/pull/164.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/164/head:pull/164

PR: https://git.openjdk.org/jextract/pull/164


More information about the jextract-dev mailing list