On Thu, 12 Jul 2012 03:18:51 -0400, Christophe Travert <trav...@phare.normalesup.org> wrote:

"David Piepgrass" , dans le message (digitalmars.D:172007), a écrit :
@mutating class B : A
{
    private int _x2;
    public @property override x() { return _x2++; }
}

A fun() pure;

You can't cast the result of fun to immutable, because it may be a B
instance.

Yes. To complete the point, since you have no idea what has derived from A, it can never be done for non-final objects.

-Steve

Reply via email to