import issue?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed Nov 22 16:51:54 UTC 2023


On 23/11/2023 5:34 AM, DLearner wrote:
> Is the encapsulation issue resolved if the struct itself is held in 
> another module, and imported from that module into both the 'main' and 
> 'Ex_mod' files?

Each module is its own encapsulation unit.

As long as you are using the same distinct type in both modules, the 
issues are resolved.

Where the distinct type is defined does not matter for matching of 
function parameters.


More information about the Digitalmars-d-learn mailing list