[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 05:43:29 PST 2010


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


Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com


--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> 2010-01-21 05:43:28 PST ---
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)

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