Can we fix this?

Steven Schveighoffer schveiguy at gmail.com
Thu Sep 30 14:44:52 UTC 2021


On 9/30/21 10:42 AM, Steven Schveighoffer wrote:

> ```d
> void delegate() dg;
> for(int i = 0; i < 100; ++i)
> {
>     dg = { writeln(i); };
> }
> 
> dg();
> ```

Haha of course, I shouldn't overwrite the same delegate.

It should have been an array of delegates, but the point still stands.

-Steve


More information about the Digitalmars-d mailing list