On Sunday, 3 February 2013 at 18:28:06 UTC, Andrei Alexandrescu wrote:
[..]
This is a matter of visibility. The presence of a member precludes any UFCS. Won't compile. Same for the 2nd example.

Just to be perfectly clear, it must be that this wouldn't compile either, right?

struct S
{
    int _n;

    @property int prop() const
    {
        return _n;
    }
}

@property void prop(ref S s, int n)
{
    s._n = 42;
}

void main()
{
    S s;
    s.prop = 10;
}

Reply via email to