Integrated: 8345248: Module name 'transitive' not accepted for `requires transitive`

Jan Lahoda jlahoda at openjdk.org
Wed Dec 4 06:04:46 UTC 2024


On Fri, 29 Nov 2024 14:16:30 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Considering module named `transitive`, it should be possible to write: `requires transitive;`, which works, and also `requires transitive transitive;`, which currently does not work:
> 
> $ javac -d out/ --module-source-path . transitive/module-info.java test/module-info.java
> test/module-info.java:2: error: repeated modifier
>     requires transitive transitive;
>                         ^
> test/module-info.java:2: error: <identifier> expected
>     requires transitive transitive;
>                                   ^
> 2 errors
> 
> 
> The proposed solution is to properly handle lookahead if the transitive flag has already been seen.

This pull request has now been integrated.

Changeset: e15912b8
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e15912b804ca42446f5fc309aa44043c9209b977
Stats:     110 lines in 2 files changed: 106 ins; 3 del; 1 mod

8345248: Module name 'transitive' not accepted for `requires transitive`

Reviewed-by: vromero

-------------

PR: https://git.openjdk.org/jdk/pull/22460


More information about the compiler-dev mailing list