Struct polymorphism?

Era Scarecrow rtcvb32 at yahoo.com
Tue Oct 9 00:05:41 PDT 2012


On Tuesday, 9 October 2012 at 06:53:54 UTC, Jacob Carlborg wrote:
> As far as I understand it, opDispatch needs a receiver, I.e. 
> this.foo() or obj.foo(). I asked the same question a while ago 
> and got that answer, it's by design.

  I've also tried adding a opDispatch in the same struct and the 
error still comes up. Guess it doesn't qualify opDispatch as 
known at compile-time unless you explicitly say so.

  Mmm.. I'm not satisfied with that, but it's a lesser evil we can 
live with.


More information about the Digitalmars-d-learn mailing list