On Tue, Jul 05, 2016 at 04:11:58PM +0000, zabruk70 via Digitalmars-d-learn 
wrote:
> On Tuesday, 5 July 2016 at 10:52:10 UTC, zodd wrote:
> > Property functions are used wrong by a compiler when it needs
> 
> i am sorry for my dumbness, what wrong with this code?
> 
> import std.stdio;
> 
> struct A {
>     @property ref int value() {
>         return value_;
>     }
> 
>     @property void value(int v) {
>       value_ = v;
>     }

This overload is redundant, now that the first overload is ref.


> private:
>       int value_;
> }
[...]


T

-- 
He who does not appreciate the beauty of language is not worthy to bemoan its 
flaws.

Reply via email to