RFR: 7903612: Nested struct typedefs fail to compile [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Dec 15 10:29:20 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`.

Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:

  Add missing copyright

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

Changes:
  - all: https://git.openjdk.org/jextract/pull/164/files
  - new: https://git.openjdk.org/jextract/pull/164/files/ae5cf78c..021d4695

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jextract&pr=164&range=01
 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=164&range=00-01

  Stats: 23 lines in 1 file changed: 23 ins; 0 del; 0 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