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


Denis <verylonglogin....@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin....@gmail.com


--- Comment #1 from Denis <verylonglogin....@gmail.com> 2012-02-13 14:44:03 MSK 
---
Probably the same issue:
---
char[] f() {
    char[] buff = new char[1];
    buff[0] = 0; // works
    buff.ptr[0] = 0; // works
    *(&buff[0]) = 0; // works
    char* t = &buff[0]; *t = 0;   // error
    foreach(ref el; buff) el = 0; // error
    return buff; 
} 

static assert(f() == "\0");
---
Where `error` means: `Error: cannot cast a read-only string literal to mutable
in CTFE`

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to