Accessing a function within an object's superclass from the outside

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 14 15:04:33 PST 2017


On Saturday, 14 January 2017 at 22:38:15 UTC, David  Zhang wrote:
> On Saturday, 14 January 2017 at 22:17:23 UTC, ketmar wrote:
>> class ClassB: ClassA {
>>   alias fun = super.fun;
>>   override void fun(uint a) {}
>> }
>
> I tried that, but it seems to think I mean to override 
> super.fun(uint) instead of super.fun(uint, float).

ahem?
`void fun(uint a)` == `void fun(uint a)`
`void fun(uint a)` != `void fun(uint, float)`
of course, you mean to override `void fun(uint a)` with this code.


More information about the Digitalmars-d-learn mailing list