Fwd: Add reads to open module
Christian Beikov
christian.beikov at gmail.com
Mon May 17 15:43:15 UTC 2021
Hi,
I have a use case where I generate some code and that code refers to
classes of some module B.
When the module A (an open module), into which I define that class, has
no read-edges to the module B, this fails saying that A does not read B.
That's fine and totally understandable, so I tried to add the following
code:
moduleA.addReads("moduleB.pkg", moduleB)
but this is not allowed as `addReads` only works if `this == callerModule`.
My workaround is to define a class into module A that can then call this
method.
Is there a reason to this limitation? I mean the module is open anyway,
so anyone can just define a class into it, so why not also allow calling
addReads?
Regards,
Christian
More information about the jigsaw-dev
mailing list