Bug 2292 – .reash of associative arrays

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-08-19T10:14:00Z
Last change time
2014-03-01T00:36:58Z
Assigned to
bugzilla
Creator
enzo.petrelli

Comments

Comment #0 by enzo.petrelli — 2008-08-19T10:14:52Z
/*************************** OS: Windows XP Pro SP2 / Vista SP1 Compiler/linker: Digital Mars D Compiler v1.034 Tango/tangobos Lib: tango-0.99.7-bin-win32-dmd.1.033 Compiled with: no compile/link flag after a call to .rehash of an associative array, accessing the .keys of the associative array gives 'Access violation' ***************************/ import std.cstream; void main() { int[char[]] aiHash; aiHash["one"] = 1; aiHash["two"] = 2; aiHash["three"] = 3; aiHash["four"] = 4; aiHash["five"] = 5; // uncommenting the following line, execution gives "Access violation" // aiHash.rehash; foreach (char[] sKey; aiHash.keys) dout.writefln("%-8s ==> %d", sKey, aiHash[sKey]); }
Comment #1 by bugzilla — 2008-08-26T02:35:26Z
I cannot reproduce a crash.
Comment #2 by enzo.petrelli — 2008-08-28T07:55:07Z
It is a tango/tangobos issue. Sorry for the inconvenience.