aliasing base methods

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Mon Feb 26 13:32:21 PST 2007


>> To the ambiguity issue of the alias:
>> Override is always/already precise, because it *is* bundled with the
>> complete method signature.
> 
> Don't follow you there.

My point was, that the alias is actually not precise, but the override
already is.

If you alias a method, it can be ambiguous, because you do not specify
which version you want to alias. You would need to extend the syntax to
make is precise.

alias Base.fnc fnc;      // all fnc (not precise)
alias Base.fnc(int) fnc; // exactly this fnc. (precise)

In the opposite, the override keyword is already precise, because it is
the method signature.

override void fnc( float ){ ... }

No change in syntax needed.



More information about the Digitalmars-d mailing list