Restriction on interface function types
Adam D. Ruppe
destructionator at gmail.com
Wed Mar 12 06:09:26 PDT 2014
On Wednesday, 12 March 2014 at 13:05:07 UTC, Steve Teale wrote:
> I a = new A();
>
> Seems like a bug to me.
You are working through the interface, so the type will be what
was written in the interface. If you made that "A a = new A();",
then you could see type A on the override.
But the interface has no way of knowing which child class is
there at compile time so it has to work through base types only.
More information about the Digitalmars-d
mailing list