Overloaded function disappears on polymorphism

Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 24 11:03:13 PST 2015


> For Tesla, I expected that makeBeep( string s ) would still be 
> defined. Because I have overridden on makeBeep( char c ). Isn't 
> that correct?

alias makeBeep = Car.makeBeep; pulls the base classes overloads 
into your subclass.


More information about the Digitalmars-d-learn mailing list