On 9/15/12, Ben Davis <[email protected]> wrote: > Never mind, I found the answer in the 'templates' page of the spec: > > class Super { > T doStuff(this T)() { ...; return cast(T)this; } > } > > Sub x = (new Sub()).doStuff(); > > It seems a bit of a shame that I need the cast, but it's a small thing :)
Ah the template this solution, I always forget about that little trick! Nicely done. :)
