Module and package with the same name

Walter Bright newshound at digitalmars.com
Mon Mar 20 15:06:34 PST 2006


"Francois Retief" <fgretief at ieee.org> wrote in message 
news:dvn6t3$uh9$1 at digitaldaemon.com...
> #  hal.d: module hal and package hal have the same name.
>
> Is this expected behaviour?

Yes.

> If so, why this limitation?

For the same reason that this doesn't work:

int S;
struct S { ... }

Name resolution should be scope dependent, not semantic dependent.





More information about the Digitalmars-d mailing list