November 22, 2011 Internal error: ..\ztc\cgcs.c 352 | ||||
|---|---|---|---|---|
| ||||
Hi guys,
I get an internal error in \ztc\cgcs.c 352 when I try to do the following:
HashMap!(uint, float[2]) example;
void main() {
example = new HashMap!(uint, float[2])();
example.set(0, [10.f, 20.f]);
example.set(10, [100.f, 200.f]);
foreach (ref c; example.keys) std.stdio.writeln(example[c][0]);
// same result by using foreach (ref c; example.keys) std.stdio.writeln
(example.elemAt(c).front()[0]);
}
I know that dcollection is a third party library, but it seems to be an error/ bug in the latest dmd compiler (2.056). Btw... the following code works:
HashMap!(uint, float[2]) example;
void main() {
example = new HashMap!(uint, float[2])();
example.set(0, [10.f, 20.f]);
example.set(10, [100.f, 200.f]);
foreach (ref c; example.keys) {
float[2] f = example.elemAt(c).front();
std.stdio.writeln(f[0]);
}
}
Can anyone confirm the error? Thanks!
| ||||
November 22, 2011 Re: Internal error: ..\ztc\cgcs.c 352 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nrgyzer | Please check if your case is equal to http://d.puremagic.com/issues/show_bug.cgi?id=4414 | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply