[Issue 1841] Closure detection doesn't work when variable is used in a nested function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 24 01:23:12 PST 2013


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



--- Comment #6 from Don <clugdbug at yahoo.com.au> 2013-01-24 01:23:08 PST ---
The basic problem is that the existing closure detection only checks parents of
nested functions. It should also check sibling nested functions.
Ie, if one nested function f calls another nested function g, then if g needs a
closure, then so does f.
More complex cases are possible, such as where f calls g which calls h, f
escapes, h uses closure variables but f and g don't.

I have a fix for the original test case, still working on the more complex
cases.

-- 
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