This is not just a question.
Kagamin
spam at here.lot
Wed Nov 12 00:26:14 PST 2008
Yonggang Luo Wrote:
> This is not just a question.
> I think this must be illegal..
> Why?
> Because we are "private import baseClass;"
private import affects only import, not imported classes, if you want Base to be private, declare *it* private. You can't affect type declarations just by importing them.
> and Now we create the third file that named thirdClass.d;
> The content is.
>
> module thirdClass;
> private import subClass;
>
> so if class Sub:Base is legal, then we also can access Base.
And we can, in fact.
> But the fact is "private import Base";
> from this clue , we can't access Base Class.
> So it's confusing.
If you can't access anything through private import, lol, why you would need it?
More information about the Digitalmars-d
mailing list