On Mon, 25 Jan 2010 22:45:10 -0500, Ali Çehreli <[email protected]> wrote:

Steven Schveighoffer wrote:
 > On Sun, 24 Jan 2010 04:25:21 -0500, grauzone <[email protected]> wrote:

 > Templates won't work here, you cannot template the 'this' pointer.  So
> you end up with 3 identical implementations, and *no* const guarantee on
 > the mutable one:
 >
 > @property C c() { return _c; }
 > @property const(C) c() const { return _c; }
 > @property immutable(C) c() immutable { return _c; }

Is there a known bug in 2.039 about this feature? It doesn't seem to consider the hidden this parameter:

class C {}

struct S
{
    C _c;

     @property inout(C) c() inout
     {
         return _c;
     }
}

Error: inout on return means inout must be on a parameter as well for inout inout(C)()

Yes, this is a bug. inout is so fundamentally broken right now, I didn't bother reporting all the deficiencies in bugzilla, but I did mention them on the announce newsgroup.

I hope within the next couple releases, it is addressed.

In fact, if it is not addressed in the next release, I should probably report all the issues to bugzilla.

-Steve

Reply via email to