[Issue 9506] When using alias this, writeln modifies its argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 7 15:44:43 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=9506


Peter Alexander <peter.alexander.au at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au at gmail.co
                   |                            |m


--- Comment #7 from Peter Alexander <peter.alexander.au at gmail.com> 2014-02-07 15:44:35 PST ---
I don't think this is a bug. Since the array is in a class, it is essentially
passed by reference and range algorithms generally mutate ranges. Any class
range will be consumed by writeln.

I think it would be a bug if the range was not consumed. Implicit conversions
make this quite tricky to track though.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list