Congratulations to the D Team!
Steven Schveighoffer
schveiguy at yahoo.com
Wed Jul 11 11:53:09 PDT 2012
On Wed, 11 Jul 2012 14:21:24 -0400, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> It also seems to allow abuses. For example:
>
> class A
> {
> private int _x;
> public @property x() const { return _x; }
> }
>
> class B : A
> {
> private int _x2;
> public @property x() { return _x2++; }
> }
>
Another abuse:
const(B) b = new B;
// auto bx = b.x; // oops, compiler error
const(A) a = b;
auto bx = a.x;
-Steve
More information about the Digitalmars-d
mailing list