Bug 9342 – nested aggregates generate closures, even when they don't escape

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-17T16:54:40Z
Last change time
2024-12-13T18:03:48Z
Assigned to
No Owner
Creator
Nils
Moved to GitHub: dmd#18514 →

Comments

Comment #0 by nilsbossung — 2013-01-17T16:54:40Z
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.
Comment #1 by robert.schadek — 2024-12-13T18:03:48Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18514 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB