On 19/11/2016 20:39, Remi Forax wrote:

Ok, i may have a found bug.

The spec says (section 1.1.3)
"The service interface may be declared in the current module or in another module. 
If the service interface is not declared in the current module, then the service 
interface must be accessible to code in the current module, or a compile-time error 
occurs."
but the check in Resolve.checkExportSuppliers is this one:
     // uses S
     for (String service : descriptor1.uses()) {
         String pn = packageName(service);
         if (!packageToExporter.containsKey(pn)) {
             fail("Module %s does not read a module that exports %s",
                  descriptor1.name(), pn);
         }
      }
which doesn't take care of the case of a service interface declared in another 
module.

I don't see a bug here. If m1 `uses p.S` and m1 reads m2 that exports p to at least m1 then this map will contain p -> m2.

-Alan.

Reply via email to