DIP23 draft: Fixing properties redux
TommiT
tommitissari at hotmail.com
Sun Feb 3 10:32:35 PST 2013
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;
}
More information about the Digitalmars-d
mailing list