View source code
Display the source code in dmd/semantic3.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aBugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinglocal clone.
Function dmd.semantic3.checkClosure
Determine whether the given function will need to allocate a closure_ and verify that such an allocation is allowed under the current compilation settings.
Whenever an error is emitted, every nested function that actually closes over a variable is listed in a supplemental diagnostic, together with the location of the captured variable’s declaration. (This extra walk is skipped when the compiler is gagged.)
See Also
FuncDeclaration.needsClosure FuncDeclaration.setGC FuncDeclaration.printGCUsage
Authors
License
Copyright © 1999-2026 by the D Language Foundation | Page generated by ddox.