http://d.puremagic.com/issues/show_bug.cgi?id=6458
--- Comment #8 from Don <[email protected]> 2011-08-09 00:09:02 PDT --- (In reply to comment #7) > As far as I can see, D uses the smallest type necessary to fit a character > literal. So all non-ascii character literals will either be wchar or dchar. > Both of the following passes, as expected. > > static assert(is(typeof('�') == wchar)); > static assert(is(typeof('a') == char)); That's good news. Seems like it's only a few cases where it behaves stupidly. > But I don't know why the compiler allows to assign a wchar to a char array > element. That doesn't seem right. It's more general than that: wchar w = '�'; char c = w; // Error: cannot implicitly convert expression (w) of type wchar to char char c = '�'; // passes!!! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
