[Issue 2542] array casts behave differently at compile and runtime

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 27 04:11:39 PST 2008


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





------- Comment #2 from kamm-removethis at incasoftware.de  2008-12-27 06:11 -------
While you're at it, could you also document these casts for string literals?

short[] ct1 = cast(short[]) "\x01\x01"; // [ 257 ]
short[] ct2 = cast(short[]) [cast(char)1, 1]; // [1, 1]

even though both literals represent the same char[2] value.


-- 



More information about the Digitalmars-d-bugs mailing list