Compilation error due to overloaded method with unavailable	parameter type
    Alex Buckley 
    alex.buckley at oracle.com
       
    Tue May 31 22:20:26 UTC 2016
    
    
  
On 5/31/2016 2:51 PM, Gunnar Morling wrote:
> That said, couldn't the exporting module (here java.desktop) be added
> implicitly as a dependency when examining a candidate method referring
> to unavailable types (here BufferedImage) in an automatic module during
> resolution?
Not sure which resolution you're referring to.
Module resolution (by the module system) doesn't examine method 
signatures, nor should it.
Overload resolution (by the compiler) doesn't modify the graph of module 
readability set up by 'requires' clauses and -addmods, nor should it.
Anyway, what if there were two modules observable on the modulepath that 
both export java.awt.image? Or, what if there was one module observable 
on the modulepath that exports java.awt.image but it also exports 
another package that's already exported by a module you read? Trying to 
infer dependencies is fraught with danger which is why the only time we 
do it is for automatic modules, and even then in a limited fashion 
(previously resolved modules only).
Alex
    
    
More information about the jigsaw-dev
mailing list