Thread overview | |||||
---|---|---|---|---|---|
|
May 09, 2011 [Issue 5965] New: [2.053 beta] map rejects a predicate with anon-func and nested func | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: cbkbbejeap@mailinator.com --- Comment #0 from Nick Sabalausky <cbkbbejeap@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: ------- |
May 11, 2011 [Issue 5965] [2.053 beta] map rejects a predicate with anon-func and nested func | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | http://d.puremagic.com/issues/show_bug.cgi?id=5965 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-05-11 13:28:18 PDT --- Reduced test case: template mapx(fun...) if (fun.length >= 1) { int mapx(Range)(Range r) { return 1; } } void test() { int foo(int i) { return i; } int[] arr; auto x = mapx!( function(int a){return foo(a);} )(arr); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 12, 2011 [Issue 5965] [2.053 beta] map rejects a predicate with anon-func and nested func | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | http://d.puremagic.com/issues/show_bug.cgi?id=5965 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-05-11 20:17:19 PDT --- https://github.com/D-Programming-Language/dmd/commit/42ee97af67cdf05697d8119dc113ed568b9f2a3c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation