Automatic method overriding in sub-classes

bitwise via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 31 09:55:31 PDT 2015


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


More information about the Digitalmars-d mailing list