http://d.puremagic.com/issues/show_bug.cgi?id=6458
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 AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 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() { bug6458(); } Surely this has been reported before, but I can't find it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------