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)()

Ali

Reply via email to