[Issue 5965] New: [2.053 beta] map rejects a predicate with anon-func and nested func
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 8 22:44:24 PDT 2011
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: nobody at puremagic.com
ReportedBy: cbkbbejeap at mailinator.com
--- Comment #0 from Nick Sabalausky <cbkbbejeap at mailinator.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list