digitalmars.D.bugs - wchar[]/dchar[] dup
- Thomas Kuehne (14/14) Apr 23 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Walter (5/10) Apr 24 2005 to wchar[]
- =?UTF-8?B?VGhvbWFzIEvDvGhuZQ==?= (45/45) Apr 24 2005 -----BEGIN PGP SIGNED MESSAGE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd: cannot implicitly convert expression (_adDup("abc",1)) of type char[] to wchar[] Fails to compile but should compile. Added to DStress as http://dstress.kuehne.cn/run/dup_06.d http://dstress.kuehne.cn/run/dup_07.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCajJR3w+/yD4P9tIRAhsIAJ0e5kqU4DG/k0TyOMXRGigKnKhvIACbBAWo 8iYG9lSbvgT8Bwc7t8rsMvA= =P8ET -----END PGP SIGNATURE-----
Apr 23 2005
"Thomas Kuehne" <thomas-dloop kuehne.thisisspam.cn> wrote in message news:ibopj2-3qi.ln1 lnews.kuehne.cn...-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dmd: cannot implicitly convert expression (_adDup("abc",1)) of type char[]to wchar[]Fails to compile but should compile.I disagree. If the string literal is forced to commit to a type, which it must with the .dup, it goes with char[].
Apr 24 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Walter wrote: | "Thomas Kuehne" <thomas-dloop kuehne.thisisspam.cn> wrote in message | news:ibopj2-3qi.ln1 lnews.kuehne.cn... |> |> |>dmd: cannot implicitly convert expression (_adDup("abc",1)) of type |>char[] | | to wchar[] | |>Fails to compile but should compile. | | I disagree. If the string literal is forced to commit to a type, which | it must with the .dup, it goes with char[]. Treating this code as illegal was indeed my first reaction and seems natural. The reason for posting this was basically the same as Brad Beveridge's in "Segfault from changing a string". The different syntax for assigning a value to an editable wchar/dchar[] on Linux and Windows is a nice bug trap for Windows-based coders. Windows: Linux: Please unify the behaviour. I've removed both tests for now. Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) iD8DBQFCa84f3w+/yD4P9tIRAj0yAJ9Gp6/EnmQzUREyHlKMxc0U5OBwpACgtiHr vfq0PTxI7rkubTVW2BrAveY= =Wgg+ -----END PGP SIGNATURE-----
Apr 24 2005