[Issue 3731] Immutable class may be changed when inherits from mutable parent

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 21 11:03:01 PST 2010


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



--- Comment #2 from Tomasz Sowiński <tomeksowi at gmail.com> 2010-01-21 11:03:00 PST ---
(In reply to comment #1)
> The solution would be to make it illegal to have a mutable class reference to
> the base class.
> 
> In your example, this line should be an error:
> 
> Zmienna zm = st; // error, must use immutable(Zmienna) or const(Zmienna)

Thanks, that makes sense.

-- 
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