Iterating over an enum associative array
Nebster
Evil.Nebster at gmail.com
Mon Mar 14 04:21:59 PDT 2011
Hey,
I'm having some problems iterating over an enumerated associative array.
It comes up with this error at compile time:
> Internal error: e2ir.c 4835
I cut the code down to this:
> import std.stdio;
>
> enum int[string] assoc = [";": 0, "=": 1, "+": 2, "-": 2, "*": 3,
"/": 3];
>
> void main()
> {
> foreach(op; assoc.byKey())
> writefln("op: %s", op);
> }
What does this mean/how can I get this to work?
Thanks,
Nebster
More information about the Digitalmars-d-learn
mailing list