Open nlisker opened 4 weeks ago
I guess as long as you don't contribute such improvement nothing will happen.
I believe one thing is missing from the problem description:
see:
Suppose a module dep that exports package dep with class dep.D.
and:
exports app to dep;
In order for that export to take effect module dep would also need to require module App, right?
Thus we have a cyclic dependency, which brings us back to https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2122#issuecomment-1985548047
LMK if I missed something.
In order for that export to take effect module dep would also need to require module App, right?
I don't think so because it can be accessed reflectively. See https://stackoverflow.com/questions/53035454/javafx-module-javafx-graphics.
Suppose a
module dep
that exportspackage dep
with classdep.D
. And suppose another module:then
emits a warning:
While it's true that it may not be accessible, since the module exposes the package (and class) to the module that defines that class, we can know that it will be accessible.
Can the compiler be smarter and check if the targets of an export have access to the exposed types?