Names and scope in D
Paul Backus
snarwin at gmail.com
Sat Nov 14 17:22:13 UTC 2020
On Saturday, 14 November 2020 at 17:06:49 UTC, Dibyendu Majumdar
wrote:
> I couldn't find the rules that D uses to decide whether a name
> conflicts or not. If I missed something please can someone
> point me to it?
It doesn't appear to be spelled out anywhere in the language
spec, but the rule is that two symbols in the same scope with the
same name conflict unless they form an overload set. The rules
for overload sets are laid out in the sections of the spec that
deal with functions, templates, and aliases (iirc).
More information about the Digitalmars-d
mailing list