Why this doesn't produce an error or works as expected?

partypooper pythonproof at gmail.com
Fri Jul 4 18:04:55 UTC 2025


On Friday, 4 July 2025 at 17:34:59 UTC, monkyyy wrote:
> On Friday, 4 July 2025 at 17:15:48 UTC, partypooper wrote:
> if you add ref to line 28 it works; there wont be a reasonable 
> way to make an error happen, you just have to know when to do 
> refness

It doesn't work. Or it works even worse: changing _pos, but not 
_dest. What is going on is that on `+=` it for some reason 
invokes "getter", not "setter". I specifically omitted "ref", 
because I already have known of that behavior.



More information about the Digitalmars-d-learn mailing list