javac misalignment with the JLS

Emilia López emilia.lopezf.1999 at gmail.com
Mon Jun 10 15:29:02 UTC 2024


Hi Gavin,

I submitted a bug report through the bug database submission form and
it is awaiting triage, thanks.

Regards,
Emilia López


On Mon, 10 Jun 2024 at 05:43, Gavin Bierman <gavin.bierman at oracle.com> wrote:
>
> Hi Emilia,
>
> Thanks. Could you file this as a bug and I’ll attend to it?
>
> Cheers,
> Gavin
>
> On 9 Jun 2024, at 00:16, Emilia López <emilia.lopezf.1999 at gmail.com> wrote:
>
> Hi,
>
> Upon reading the JLS, chapter §7.7.1 Module Declaration - Dependences [1], the spec does not mention anything regarding multiple appearances of the requires modifiers (transitive and static), however javac errs if static is declared multiple times, and if transitive is declared twice or more consecutively, the second time the token is consumed as a module name, despite the BNF indicating any amount of {RequiresModifier} instances; the English description is lacking. Is the Java language specification wrong, lacking or missing in describing this aspect of compilation of modular compilation units? Or does javac not abide by it?
>
> [1] https://docs.oracle.com/javase/specs/jls/se22/html/jls-7.html#jls-7.7.1
>
> Regards,
> Emilia López
>
>


More information about the compiler-dev mailing list