problem with reduce on array of Tuples

Pelle pelle.mansson at gmail.com
Thu May 27 04:05:28 PDT 2010


This has nothing to do with the tuples, I think.

test2.d:

import std.algorithm;

void main() {
     map!((int x){return x+1;})([1,2,3,4,5]);
}

pp ~/dee% rdmd test2.d
test2.d(4): Error: delegate std.algorithm.__dgliteral1 cannot access 
frame of function __dgliteral1
test2.d(4): Error: template instance test2.main.map!(delegate int(int x)
{
return x + 1;
}
) error instantiating


It's a bug with the delegate literals inside the template.


More information about the Digitalmars-d-learn mailing list