Adding overloaded methods

Jonathan M Davis jmdavisProg at gmx.com
Tue Feb 21 19:00:24 PST 2012


On Wednesday, February 22, 2012 02:50:41 BLM wrote:
> I tried using override and it complained that the functions weren't
> overriding anything. I think that the main problem is that the alias
> solution was designed to allow derived classes to use overloads that had
> already been defined in the base class, not for the derived classes to add
> _new_ overloads. This might be good material for an enhancement request.

I'd advise reporting it as a bug rather than an enhancement request. The whole 
point of using the alias is to bring all of the base class' overloads into the 
derived class' overload set. It shouldn't matter whether the derived class is 
adding overloads or just overriding a subset of the base class' overloads.

If the compiler devs really think that it's an enhancement request, then they
can change it, but it definitely looks like a bug to me.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list