javac enum Flag has no entry for POTENTIALLY_AMBIGUOUS

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Sep 24 15:28:09 UTC 2018


For the records, with some scripting, the list of flags that are not 
covered is this:

ACC_BRIDGE
ACC_MODULE
ACC_SUPER
ACC_VARARGS
ANONCONSTR_BASED
BODY_ONLY_FINALIZE
POTENTIALLY_AMBIGUOUS


Now, ACC_BRIDGE, ACC_MODULE, ACC_SUPER, ACC_VARARGS, BODY_ONLY_FINALIZE 
are just aliases for other flags which are indeed covered.

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

Maurizio



On 24/09/18 16:00, Maurizio Cimadamore wrote:
> I think you are right - given how the 'asFlagSet' is setup, any 
> numeric constant that doesn't show up in the enum could cause a crash.
>
> Maurizio
>
>
> On 24/09/18 15:49, Brent Douglas wrote:
>> Hello all,
>>
>> I have been looking into a crash in error-prone which I think stems 
>> from the enum com.sun.tools.javac.code.Flags#Flag not having an entry 
>> for POTENTIALLY_AMBIGUOUS, while the assertion at the end of 
>> Flags#asFlagSet(long) makes me think it should.
>>
>> My apologies if this is the wrong list to bring this up on, if so 
>> could someone please point me the the right list?
>>
>> Brent
>



More information about the compiler-dev mailing list