[Issue 7512] New: Associative arrays with dstring as key do not work correctly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 15 11:56:45 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7512
Summary: Associative arrays with dstring as key do not work
correctly
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: hsteoh at quickfur.ath.cx
--- Comment #0 from hsteoh at quickfur.ath.cx 2012-02-15 11:56:43 PST ---
Test case:
void main() {
int[dstring] map = ["abc"d: 123];
foreach (key, val; map) {
assert(map[key] == val); // throws RangeError ?!
}
}
Changing dstring to string fixes the problem.
--
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