Summary: Multibyte char literals shouldn't implicitly convert
                    to char
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2011-08-08 21:43:38 PDT ---
The code below should either be rejected, or work correctly.
The particularly problematic case is:   s[0..2] = '�', which looks perfectly
reasonable, but creates garbage.
I'm a bit confused about non-ASCII char literals, since although they are typed
as 'char', they can't be stored in a char... This just seems wrong.

int bug6458()
    char [] s = "abcdef".dup;
    s[0] = '�';
    assert(s == "�cdef");
    return 34;
void main()

Surely this has been reported before, but I can't find it.

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

Reply via email to