typeof map

cal callumenator at gmail.com
Mon Jun 24 19:45:33 PDT 2013


Is it by design that the code below does not compile?

import std.algorithm, std.range;

void main() {
    typeof(iota(10).map!(a=>a)) x = iota(10).map!(a=>a);	
}

Error message (DMD git-latest on DPaste):
Error: constructor f755.main.MapResult!(__lambda2, 
Result).MapResult.this (Result input) is not callable using 
argument types (MapResult!(__lambda4, Result))
Error: cannot implicitly convert expression (map(iota(10))) of 
type MapResult!(__lambda4, Result) to Result


More information about the Digitalmars-d-learn mailing list