alias this and shadowing

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 15 08:13:41 PDT 2017


On Thursday, 15 June 2017 at 15:01:27 UTC, Jonathan Shamir wrote:
> To quote Andrei, if it looks like it should work, it should. 
> (Also something about turtles).

Hmm, interestingly, even if you explicitly merge the overloads 
with `alias foo  s.foo;` (which is required btw, see: 
http://dlang.org/hijack.html )

but even doing that here gives

Error: this for foo needs to be type S1 not type S2

and I actually would expect alias this to be invoked there to 
make it work.


More information about the Digitalmars-d mailing list