← Back to index
|
Original Bugzilla link
Bug 595 – can't append to array/arrayliteral statically
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2006-11-25T08:34:00Z
Last change time
2015-06-09T05:15:04Z
Assigned to
bugzilla
Creator
lovesyao
Comments
Comment #0
by lovesyao — 2006-11-25T08:34:58Z
void main(){ const char[] test = "" ~ 'a' ~ 'b' ~ 'c';//ok char[] test2 = (cast(char[])null)~'a'~'b'~'c';//ok const char[] test3 = (cast(char[])null)~'a'~'b'~'c';//failed char[] test4 = (cast(char[])[])~'a'~'b'~'c';//ok const char[] test5 = (cast(char[])[])~'a'~'b'~'c';//failed const char[] test6 = null; const char[] test7 = test6~'a'~'b'~'c';//failed }
Comment #1
by thomas-dloop — 2006-11-25T12:05:39Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
[email protected]
schrieb am 2006-11-25: >
http://d.puremagic.com/issues/show_bug.cgi?id=595
> void main(){ > const char[] test = "" ~ 'a' ~ 'b' ~ 'c';//ok > char[] test2 = (cast(char[])null)~'a'~'b'~'c';//ok > const char[] test3 = (cast(char[])null)~'a'~'b'~'c';//failed > char[] test4 = (cast(char[])[])~'a'~'b'~'c';//ok > const char[] test5 = (cast(char[])[])~'a'~'b'~'c';//failed > const char[] test6 = null; > const char[] test7 = test6~'a'~'b'~'c';//failed > } Added to DStress as
http://dstress.kuehne.cn/compile/o/opCat_25_A.d
http://dstress.kuehne.cn/compile/o/opCat_25_B.d
(the other cases are covered by issue 353) Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFaIxQLK5blCcjpWoRAjjHAKCRmAOpraprE45RlDMy5ctaTRotSgCgq/K9 a3M88iwUCJXDQ9xDTNz1qIw= =7fXt -----END PGP SIGNATURE-----
Comment #2
by thomas-dloop — 2006-11-29T15:31:16Z
*** Bug 608 has been marked as a duplicate of this bug. ***
Comment #3
by bugzilla — 2007-04-20T13:17:08Z
Fixed DMD 1.013