http://d.puremagic.com/issues/show_bug.cgi?id=5965
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
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Nick Sabalausky <[email protected]> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------