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

--- Comment #16 from 2011-11-17 11:59:55 PST ---
Class references have the same problem.

class A{}
class B:A{}

void main(){
    B x;
    A* y=&x; // bad!
    *y=new A;
    Object o = x;
    assert(o is x && o && is(typeof(x)==B) && !cast(B)o);

I have generalized the title accordingly.

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

Reply via email to