[Issue 4312] std.traits.ReturnType no longer accepts function literals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 27 06:50:49 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=4312



--- Comment #5 from Rob Jacques <sandford at jhu.edu> 2011-05-27 06:46:29 PDT ---
I'm not defining a closure. I'm defining a nested function literal. And given
that the following compiles:

void main()
{
    int b;
    int funcliteral(int a){return a+b;}
    writeln(  (ReturnType!funcliteral).stringof );
}

I would also expect 

void main(string[] args) {
    int b;
    writeln(  (ReturnType!( function(int a){return a+b;} )).stringof );
}

to work. But, as you pointed out, this isn't a problem with ReturnType anymore.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list