[Issue 2173] foreach iteration not possible for associative array indexed with static array

Koroskin Denis 2korden at gmail.com
Fri Jun 27 05:22:48 PDT 2008


On Thu, 26 Jun 2008 17:19:41 +0400, Jarrett Billingsley  
<kb3ctd2 at yahoo.com> wrote:

> <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.
>
>

That's not hard to patch je to jne, I assume :)


More information about the Digitalmars-d-bugs mailing list