[Issue 7696] The Array container works improperly when using as a property
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 23 22:59:12 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=7696
Damian <damianday at hotmail.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |damianday at hotmail.co.uk
Resolution|--- |INVALID
--- Comment #1 from Damian <damianday at hotmail.co.uk> ---
It's because your property is returning a copy of the array not the original.
Fixed by using a reference to the Array like so:
public ref Array!(int) Children() { return m_Children; }
--
More information about the Digitalmars-d-bugs
mailing list