Closures and loop scope

Timon Gehr timon.gehr at gmx.ch
Tue Jun 4 15:18:43 PDT 2013


On 06/05/2013 12:16 AM, Timon Gehr wrote:
> On 06/04/2013 11:57 PM, Nick Sabalausky wrote:
>> ...
>>
>> Keep in mind that this exhibits the same "mutating immutable" behavior:
>>
>> // Prints 0, 1, 2, 3, 4, even though i is immutable
>> foreach(immutable i; 0..5){
>>      writeln(i);
>>
>
>
> No, it does not! ...

You can disregard that, there was a race condition.



More information about the Digitalmars-d mailing list