main.d
===================================================
class Car{
        public void makeBeep( char c ){}
        public void makeBeep( string s ){}
}

class Tesla: Car{
        override public void makeBeep( char c ){
                writeln("C = ", c);
        }
}

void main(){
        auto t = new Tesla();

        t.makeBeep("Model S");
}
===================================================

Error: function main.Tesla.makeBeep (char c) is not callable using argument types (string)

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

Reply via email to