What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |
         Resolution|                            |INVALID

--- Comment #1 from 2012-04-22 11:51:45 PDT ---
(In reply to comment #0)
> The chaps on IRC seemed to think this was a bug and I should report it.

They were wrong.

void failCast(const(char)*[] arg) {
    arg[0] = "123".ptr;

void main() {
    char*[] x = ["234".dup.ptr];
    failCast(x); // if this passes then x[0] has type char*
    assert(x[0][0..3] == "123");  //  and points into the immutable data

Change the signature of failCast to

void failCast(inout(char)*[] arg)

to get the desired semantics.

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

Reply via email to