www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - wchar[] concatenation bug (dmd 0.131 win32)

reply zwang <nehzgnaw gmail.com> writes:
import std.stdio;
void main(){
     const wchar[] S = "bug"w;
     writefln(S ~ "s"w); //the output is messed up.
     assert(0); //more surprisingly, this line is never called.
}
Sep 14 2005
next sibling parent Derek Parnell <derek psych.ward> writes:
On Thu, 15 Sep 2005 11:13:25 +0800, zwang wrote:

 import std.stdio;
 void main(){
      const wchar[] S = "bug"w;
      writefln(S ~ "s"w); //the output is messed up.
      assert(0); //more surprisingly, this line is never called.
 }
Here is my spin .... import std.stdio; void main(){ debug(CONST) { const wchar[] S = "bug"w; // Doesn't work! } else { wchar[] S = "bug"w; // Works! } writefln("%s", S ~ "s"w); assert(0); // Always called and aborts accordingly. } -- Derek (skype: derek.j.parnell) Melbourne, Australia 15/09/2005 1:43:09 PM
Sep 14 2005
prev sibling parent =?ISO-8859-1?Q?Thomas_K=FChne?= <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zwang schrieb:

 import std.stdio;
 void main(){
     const wchar[] S = "bug"w;
     writefln(S ~ "s"w); //the output is messed up.
     assert(0); //more surprisingly, this line is never called.
 }
Added to DStress as http://dstress.kuehne.cn/norun/opCat_16_A.d http://dstress.kuehne.cn/norun/opCat_16_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDKwDU3w+/yD4P9tIRArvgAKCfZTthueKyetf+z+I41DacPjnsbQCfX4Lx 1G6EwPNqJTeXFfVfqfZ/Qak= =Cf/n -----END PGP SIGNATURE-----
Sep 16 2005