[Issue 6458] Multibyte char literals shouldn't implicitly convert to char

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 8 23:44:24 PDT 2011


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


Jacob Carlborg <doob at me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob at me.com


--- Comment #7 from Jacob Carlborg <doob at me.com> 2011-08-08 23:44:22 PDT ---
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));

But I don't know why the compiler allows to assign a wchar to a char array
element. That doesn't seem right.

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


More information about the Digitalmars-d-bugs mailing list