[Issue 9342] New: nested aggregates generate closures, even when they don't escape

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 17 16:54:41 PST 2013


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

           Summary: nested aggregates generate closures, even when they
                    don't escape
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: nilsbossung at googlemail.com


--- Comment #0 from Nils <nilsbossung at googlemail.com> 2013-01-17 16:54:40 PST ---
This creates a closure over i:
---
void f() {
    int i;
    struct N {
        void makeNested() {++i;}
    }
    // maybe do something with N
}
---
Would be neat if it didn't.

For example, std.string.sformat suffers from this.

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