RFR: Generate Java enums
Vivek Narang
duke at openjdk.org
Mon Jul 7 18:39:51 UTC 2025
On Thu, 3 Jul 2025 09:38:18 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>
> ```
> enum Color
> {
> Red,
> Green,
> Blue,
> }
> ```
>
> C code can do things like `Red | Blue` -- which are not possible with Java enums.
>
Hey @mcimadamore please excuse my gap in understanding here, but won't this operation be possible in Java by doing: `Color.Red.ordinal() | Color.Blue.ordinal()`?
-------------
PR Comment: https://git.openjdk.org/jextract/pull/284#issuecomment-3046175531
More information about the jextract-dev
mailing list