javac misalignment with the JLS
Emilia López
emilia.lopezf.1999 at gmail.com
Sat Jun 8 23:17:14 UTC 2024
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jls-jvms-spec-comments/attachments/20240608/60332ab8/attachment.htm>
More information about the jls-jvms-spec-comments
mailing list