Names and scope in D
Adam D. Ruppe
destructionator at gmail.com
Sat Nov 28 15:52:00 UTC 2020
On Saturday, 28 November 2020 at 15:39:48 UTC, Dibyendu Majumdar
wrote:
> That doesn't seem to be true.
>
> Example:
>
> at module level:
>
> struct scopes {}
> int scopes;
That's overloading, not shadowing. How would you disambiguate
that in a case like:
template foo(alias a) {}
foo!scopes; // which scopes?
You can have any one but not both like this. With the module name
though you can specify scopes.scopes or .scopes and such to
specify.
More information about the Digitalmars-d
mailing list