[Issue 7704] New: RangeError when using key optainey by AA byKey() iteration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 13 16:05:48 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7704
Summary: RangeError when using key optainey by AA byKey()
iteration
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: tobias at pankrath.net
--- Comment #0 from Tobias Pankrath <tobias at pankrath.net> 2012-03-13 16:05:57 PDT ---
I get this error:
tobias at akela-buntschuh:~/projects/neo$ ./test
core.exception.RangeError at test(18): Range violation
----------------
./test(_d_array_bounds+0x2a) [0x447c82]
./test() [0x4440c6]
./test(void test.main().int __foreachbody1285(ref immutable(dchar)[])+0x5c)
[0x4435a8]
./test(int delegate(int delegate(ref immutable(dchar)[]))
object.AssociativeArray!(immutable(dchar)[], int).AssociativeArray.byKey().int
foo(int delegate(ref immutable(dchar)[])).int byKeydg(ref immutable(dchar)[],
ref int)+0x24) [0x443894]
./test(_aaApply2+0x74) [0x4471e4]
./test(int delegate(int delegate(ref immutable(dchar)[]))
object.AssociativeArray!(immutable(dchar)[], int).AssociativeArray.byKey().int
foo(int delegate(ref immutable(dchar)[]))+0x54) [0x443868]
./test(_Dmain+0x3c) [0x443540]
./test(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17)
[0x448227]
./test(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void
delegate())+0x2a) [0x447dce]
./test(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x42)
[0x44827a]
./test(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void
delegate())+0x2a) [0x447dce]
./test(main+0xd3) [0x447d5f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fa6018ca30d]
when running the attached program with DMD 2.57
int[dstring] aa;
static this()
{
aa = [
"+"d : 1,
"/"d : 2,
"-"d : 3,
"*"d : 4
];
}
void main()
{
foreach(key; aa.byKey())
writeln(aa[key]);
}
--
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