[Issue 2544] implicit const casting rules allow violations of const-safety

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 17 05:31:52 PST 2009


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



--- Comment #7 from Steven Schveighoffer <schveiguy at yahoo.com> 2009-12-17 05:31:50 PST ---
(In reply to comment #6)
> 
> Does this change cover all cases discussed in the thread linked to in comment
> 2?

>From looking at the code changes, it does not fix casts from a derived class
array to a base class array.  However, that issue is captured in bug 2095.  I
don't think this means 2095 is not an important bug to fix, but it might be
that this bug is *really* simple to fix, and 2095 is not (Walter would know
better).  I'd rather have this part of it fixed than neither part fixed.

In any case, the example in comment 1 and the original description should
theoretically be fixed by the change, so we can at least close *this* bug.  I
agree that something needs to be done about casting a derived class array to a
base class array, and it seems like the solution proposed in the thread would
work.

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


More information about the Digitalmars-d-bugs mailing list