Properties don't work as expected
zodd via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jul 5 04:48:06 PDT 2016
On Tuesday, 5 July 2016 at 11:02:11 UTC, Satoshi wrote:
> On Tuesday, 5 July 2016 at 10:52:10 UTC, zodd wrote:
>> Property functions are used wrong by a compiler when it needs
>> to get and set a value at the same time:
>>
>> [...]
>
>
>
> Try
> @property ref int value() {
> return value_;
> }
What if I need a setter function? I would never bother with
properties and just used the field itself otherwise.
More information about the Digitalmars-d-learn
mailing list