[Issue 2173] foreach iteration not possible for associative array indexed with static array
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Jun 26 06:19:41 PDT 2008
<d-bugmail at puremagic.com> wrote in message
news:g3vdj3$114l$1 at digitalmars.com...
> http://d.puremagic.com/issues/show_bug.cgi?id=2173
> i bet the code actually meant as following:
>
> mtype.c (2790):
> if (arg->storageClass & (STCout | STCref | STClazy))
> {
> --- if (t->ty == Tsarray)
> +++ if (t->ty != Tsarray)
> error(loc, "cannot have out or ref parameter of type
> %s",
> t->toChars());
> }
Now static arrays are the only type that can be out, ref, or lazy. I don't
think that's much of a fix. Maybe just get rid of the check entirely.
> I hand-crafted a dmd which bypass this check, it can generate correct
> binary.
How can you do that? The backend is closed source.
More information about the Digitalmars-d-bugs
mailing list