Summary: [2.053 beta] map rejects a predicate with anon-func
                    and nested func
           Product: D
           Version: future
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from Nick Sabalausky <> 2011-05-08 
22:40:28 PDT ---
import std.algorithm;

void main()
 int foo(int i) { return i; }

 int[] arr;
 auto x = map!( (int a){return foo(a);} )(arr);

That worked in 2.052, but fails to compile in 2.053 beta with the message:

test.d(8): Error: delegate std.algorithm.__dgliteral1 cannot access frame of 
function test.main.__dgliteral1

I haven't checked to see if this is an issue with map or with using that func
as a template argument.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to