conflicting alias in package module

60rntogo 60rntogo at
Sat Sep 26 07:33:05 UTC 2020

I have a package with the following structure:

|- foo.d
|- bar.d
|- package.d

and the modules look like this:


struct Foo {}

import pack : Foo;
module pack;

public import,;

and this is an error: "struct at 
source/pack/foo.d(3,1) conflicts with alias at 
source/pack/bar.d(3,8)". I seems like the import in package.d 
sees Foo both in and, but I don't understand 
why this happens since the import in bar.d is private, isn't it?

More information about the Digitalmars-d-learn mailing list