Automatic method overriding in sub-classes

Tofu Ninja via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 31 16:46:00 PDT 2015


On Saturday, 31 October 2015 at 16:55:32 UTC, bitwise wrote:
> On Saturday, 31 October 2015 at 16:38:58 UTC, bitwise wrote:
>> @synthesized void accept(this This)(Visitor v) {
>>     v.visit(this);
>> }
>>
>
> I meant to remove "(this This)" as you don't need it if you can 
> just do "typeof(this)" in the function body.
>
> @synthesized void accept(Visitor v) {
>     v.visit(this);
> }
>
>     Bit

I don't particularly care what the syntax would be. I just choose 
auto override because it seems to match the concept pretty well 
and we already have those key words.


More information about the Digitalmars-d mailing list