Experimental approach to reference-type random number generators

monarch_dodra monarchdodra at gmail.com
Fri Aug 30 08:31:23 PDT 2013


On Friday, 30 August 2013 at 15:18:09 UTC, Dmitry Olshansky wrote:
> 30-Aug-2013 17:38, Joseph Rushton Wakeling пишет:
>> On 30/08/13 15:32, Dmitry Olshansky wrote:
>>> This is simply not acceptable, I'll put a minimized test-case 
>>> in
>>> Bugzilla if
>>> nobody beats me to it.
>>
>> Please do, I think you will state the case better than me :-)
>>
>
> Not very colorful but with minimal test-case ...
> http://d.puremagic.com/issues/show_bug.cgi?id=10928

I took a look at your bug report. This works:

//----
struct D
{
     int x;
     ~this()
     {

     }
}

void foo(D bar)
{
     void do_it(){ bar.x++; }
     do_it();
}

void main()
{
     foo(D.init);
}
//----

So while lambdas remain broken we can easily work around the 
problem in std.array.array.

If you'd care to file a pull request, I can review it double 
quick.


More information about the Digitalmars-d mailing list