RFR: 8211138: Missing Flag enum constants

Liam Miller-Cushon cushon at google.com
Wed Sep 26 04:42:25 UTC 2018


On Mon, Sep 24, 2018 at 8:29 AM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

> Which leaves out ANONCONSTR_BASED and POTENTIALLY_AMBIGUOUS, which
> should indeed be added to avoid spurious assertion failures.
>

I put together a patch and created a simple test to ensure the enum
constants are kept in sync:

webrev: http://cr.openjdk.java.net/~cushon/8211138/webrev.00/
bug: https://bugs.openjdk.java.net/browse/JDK-8211138

I wonder if there are good options for preventing this mistake statically,
instead of with a test. (e.g. using EnumSets, but maybe that's a
non-starter for performance reasons?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180925/fcee60b2/attachment.html>


More information about the compiler-dev mailing list