What    |Removed                     |Added
                 CC|                            |

------- Comment #6 from  2009-02-18 22:06 -------
I don't know if it's wise to mark bug 2544 as a duplicate of this bug.  For
example, the proposed solution (comment 3) shows a lack of understanding of
this related issue.

Specifically, I believe the proposed solution in bug 2412 comment 3 says the
following would be ok:
class base{}
class derived:base{}

derived[] x = new derived[2];
const(base)[] safe = x;

That really isn't true.  Take the following code that should resize the arrays
in place:
derived[] x = new derived[2];
derived.length = 1;
const(base)[] safe = x;
x ~= new derived(); // x[1] is now valid derived instance
safe ~= new base(); // just overwrote x[1] with a non-derived instance


Reply via email to