[SR-13637] Poor error message for closure capture list without in
#56073
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: a7baa9f1e36886e6c5cd226d988269e2
relates to:
Issue Description:
When using
[unowned self]
but forgetting to addin
, Swift says "Cannot find 'unowned' in scope" and suggests adding a comma. Ideally, the compiler would realize that the capture list is otherwise valid and suggest addingin
instead.See also: SR-7774
https://swift.godbolt.org/z/YEM49e
The text was updated successfully, but these errors were encountered: