Using the same name for diffrent entities

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 1 08:42:17 PDT 2017


On Monday, 1 May 2017 at 14:01:19 UTC, Noy wrote:
> Hello,
> Is it possible to use the same name for different entities? For 
> example calling a variable and a class\function by the same 
> name.

It only works with functions that take different parameters or 
with templated functions that have constraints, aka "overloads", 
because the compiler can determine what you want to call.


More information about the Digitalmars-d-learn mailing list