GH-787 - Allow references between sibling sub-modules.

Previously, we rejected references between sub-modules both contained in the same parent package.

Related ticket: GH-578.
This commit is contained in:
Oliver Drotbohm
2024-08-30 18:13:45 +02:00
parent 803c69835d
commit b370d5a3f2
3 changed files with 33 additions and 11 deletions

View File

@@ -211,7 +211,7 @@ In this example `inventory` is an application module as described xref:fundament
The `@ApplicationModule` annotation on the `nested` package caused that to become a nested application module in turn.
In that arrangement, the following access rules apply:
* The code in _Nested_ is only available from _Inventory_, i.e. only any of the `SomethingInventoryInternal` types can access `NestedApi`. `NestedInternal` is only accessible from `NestedApi`.
* The code in _Nested_ is only available from _Inventory_ or any types exposed by sibling application modules nested inside _Inventory_.
* Any code in the _Nested_ module can access code in parent modules, even internal.
I.e., both `NestedApi` and `NestedInternal` can access `inventory.internal.SomethingInventoryInternal`.
* Code from nested modules can also access exposed types by top-level application modules.