digitalmars.D.bugs - dchar issues?
- Lionello Lunesu <lio lunesu.remove.com> Apr 20 2006
- Deewiant <deewiant.doesnotlike.spam gmail.com> Apr 20 2006
- Lionello Lunesu <lio lunesu.remove.com> Apr 20 2006
Hi.. I think these are bugs, but I'm not entirely sure:
#void main() {
# char[] t;
#// t ~= '我'; // Error: Can only append to dynamic arrays, not char[]
~= wchar
# t ~= "我";
# char[] r;
# foreach(dchar d; t) {
# int rel = r.length;
# r ~= d;
# if (d>127) assert(r.length-rel>1); // fails
# }
# assert(r.length == t.length); // fails
#}
First of all: since I'm allowed to write "r ~= dchar", I should also be
allowed to do the same with a constant, '\u6211'. This probably got
posted before.
The second one seems similar: it compiles without complaint, but it's
not correctly appending the 2-byte dchar to the char[].
These issues seem too common not be known. Should I post them in bugzilla?
L.
Apr 20 2006
Lionello Lunesu wrote:These issues seem too common not be known. Should I post them in bugzilla? L.
Rule of thumb: if it is not in the Bugzilla, and it is a bug, post it in the Bugzilla. So I would guess, yes.
Apr 20 2006
Rule of thumb: if it is not in the Bugzilla, and it is a bug, post it in the Bugzilla.
Bug 111 ;)
Apr 20 2006








Lionello Lunesu <lio lunesu.remove.com>