[Issue 5465] New: AA.keys with char keys
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 20 03:20:10 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5465
Summary: AA.keys with char keys
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-01-20 03:18:09 PST ---
Similar code used to work in D1 (printing "aehilmpstx "), but with DMD 2.051 it
prints a wrong output:
import std.stdio;
void main() {
string text = "this is a text example";
int[char] aa;
foreach (c; text)
aa[c]++;
writeln(aa.keys);
}
Generated printout:
t1@
Expected printout, something like:
['t', 'h', ' ', 'x', 'p', 'l', 'i', 'a', 'e', 'm', 's]
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list