conflicting alias in package module
Steven Schveighoffer
schveiguy at gmail.com
Sun Sep 27 22:31:27 UTC 2020
On 9/26/20 9:45 AM, Steven Schveighoffer wrote:
> On 9/26/20 3:33 AM, 60rntogo wrote:
>> and this is an error: "struct pack.foo.Foo at source/pack/foo.d(3,1)
>> conflicts with alias pack.bar.Foo at source/pack/bar.d(3,8)". I seems
>> like the import in package.d sees Foo both in pack.foo and pack.bar,
>> but I don't understand why this happens since the import in bar.d is
>> private, isn't it?
>
> A selective import is equivalent to aliasing (to the public) the symbol
> as if it were defined in that scope.
Just in case someone comes along and reads this, I was wrong about this.
It's not a public import.
-Steve
More information about the Digitalmars-d-learn
mailing list