Hello,

currently javac from JDK9 build 159 fails to compile following modules:

module m1 { exports p; }
module m2 { exports p; }
module m3 {
    required m1
    required m2;
}

./modules/m3/module-info.java:1: error: module m3 reads package p from both m1 and m2
module m3 {
^
1 error

Currently lang-vm <http://cr.openjdk.java.net/%7Emr/jigsaw/spec/lang-vm.html> doesn't specify this behavior, however API documnetation <http://cr.openjdk.java.net/%7Emr/jigsaw/spec/api/java/lang/module/Configuration.html#resolveRequires-java.lang.module.ModuleFinder-java.util.List-java.lang.module.ModuleFinder-java.util.Collection-> specifies that such error can occur during resolution.

Should lang-vm specify it explicitly as a compile-time error?

Thank you,
Georgiy.

Reply via email to