[Issue 2521] Not possible to return immutable value by ref

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 22 17:35:59 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2521





------- Comment #4 from jason.james.house at gmail.com  2008-12-22 19:35 -------
This is definitely an invalid bug!

Func has a return type of "ref int".  The ref means that what gets returned by
the function can be modified (and affect the underlying data used by func).  If
the return type of func was int, I would hope the code would compile, but
that's a whole other issue...


-- 



More information about the Digitalmars-d-bugs mailing list