import issue?

DLearner bmqazwsx123 at gmail.com
Wed Nov 22 16:34:00 UTC 2023


On Wednesday, 22 November 2023 at 16:11:03 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> You have two ``SA`` structs, each in different encapsulations.
>
> Each of them are different, even if they have similar members.
>
> In D types that look the same do not combine, they are distinct.
>
> You can see this by comparing the mangling of each.
>
> ``pragma(msg, SA.mangleof);``

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?


More information about the Digitalmars-d-learn mailing list