Bug 594 – can't cast arrayliteral statically

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-11-25T05:29:00Z
Last change time
2015-06-09T05:15:05Z
Assigned to
bugzilla
Creator
lovesyao

Comments

Comment #0 by lovesyao — 2006-11-25T05:29:33Z
void main(){ const char[] t="abcd"; const ubyte[] t2=cast(ubyte[])t;//ok const char[] t3=['a','b','c','d']; const ubyte[] t4=cast(ubyte[])t3;//error }
Comment #1 by thomas-dloop — 2006-11-25T07:50:54Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-11-25: > http://d.puremagic.com/issues/show_bug.cgi?id=594 > void main(){ > const char[] t="abcd"; > const ubyte[] t2=cast(ubyte[])t;//ok > const char[] t3=['a','b','c','d']; > const ubyte[] t4=cast(ubyte[])t3;//error > } Added to DStress as http://dstress.kuehne.cn/compile/c/cast_33_A.d http://dstress.kuehne.cn/compile/c/cast_33_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFaD3BLK5blCcjpWoRApYEAJ0eVrL3fJZsJ2Xvr0+U8V0gPwk61ACdFjfC iiMBbopLtQHhZ/2evEdZAhY= =iyyu -----END PGP SIGNATURE-----
Comment #2 by bugzilla — 2007-04-20T13:16:54Z
Fixed DMD 1.013