Apparent conflict in ACC_SUPER rules
Alex Buckley
alex.buckley at oracle.com
Wed Aug 19 16:54:22 UTC 2020
Thanks. Filed https://bugs.openjdk.java.net/browse/JDK-8252006
Alex
On 1/28/2020 8:39 AM, Lukas Petru wrote:
> Hello.
>
> This is my feedback and request for clarification sent to the e-mail address
> as suggested in chapter 1 of Java Virtual Machine Specification.
>
> When reading the Java language specification, I found the following pieces
> of text that seem to be in contradiction:
>
> Java SE 13
> Released September 2019 as JSR 388
> (https://docs.oracle.com/javase/specs/jvms/se13/html/jvms-4.html)
>
> chapter 4 section 4.1. The ClassFile Structure
>
> access_flags
>
>> If the ACC_INTERFACE flag is set, the ACC_ABSTRACT flag must also be set,
>> and the ACC_FINAL, ACC_SUPER, ACC_ENUM, and ACC_MODULE flags set must
>> not be set.>
> I.e. for interface, never set ACC_SUPER.
>
>> Compilers to the instruction set of the Java Virtual Machine should set
>> the ACC_SUPER flag.
>
> I.e. always set ACC_SUPER.
>
> Which one is true? Should interfaces have the ACC_SUPER always set or never
> set?
>
> Kind regards,
> Lukas
More information about the jls-jvms-spec-comments
mailing list