[Issue 7514] [e2ir] Error in e2ir at dynamic array to static array cast

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 24 22:43:25 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=7514



--- Comment #5 from yebblies <yebblies at gmail.com> 2014-01-25 17:43:00 EST ---
Tricky, thanks to this:

auto str2 = cast(wchar[3])("789abc"c);
writefln("str2: ", (cast(char[])str2).length , " : ", (cast(char[])str2)); 
assert(cast(char[])str2 == "789abc"c);

I think we should disallow casting a string literal to a static array with a
different character size.

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


More information about the Digitalmars-d-bugs mailing list