[SR-10653] exhaustive capture lists #53053
Labels
compiler
The Swift compiler in itself
feature
A feature request or implementation
swift evolution proposal needed
Flag → feature: A feature that warrants a Swift evolution proposal
Additional Detail from JIRA
md5: 655268a5880dcf0a0aaaf3a9b2886422
Issue Description:
Swift really ought to have a way to specify exhaustive capture list. I really frequently want to specify an exhaustive list of captures, often empty.
Currently what I usually do (as an approximation) is to convert the closure to a
static func
with the 'captures' as parameters so I have reasonable confidence. Then I convert it back to a closure but this may break at any point in time.Strawman syntax:
What the strawman syntax doesn't provide at the moment is a way to capture by reference (which is usually done for {{var}}s).
The text was updated successfully, but these errors were encountered: