Luther Tychonievich <> changed:

           What    |Removed                     |Added
            Summary|Hole in the type system:    |Hole in the const system:
                   |Base type reference can be  |immutable values can be
                   |assigned to subtype         |overwritten (const(T) is
                   |reference (Super* is        |appendable to const(T)[])
                   |treated as a supertype of   |
                   |Sub*)                       |

--- Comment #17 from Luther Tychonievich <> 2011-11-18 
05:28:26 PST ---
(In reply to comment #16)
>     B x;
>     A* y=&x; // bad!
Everything you describe is supposed to happen. "A* y = &x" is the point of
inheritance. What exactly is the problem you see in the above? All of your
assert elements seem fine too…

Reverting title. This bug is about the const safety design of the language, not
about inheritance. Even if there is a problem with inheritance, it should be a
separate bug unless you can argue they have the same cause.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to