[SR-8546] Enforce @escaping for for all but the most trivial uses of captured variables. #51064
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
type checker
Area → compiler: Semantic analysis
Attachment: Download
Additional Detail from JIRA
md5: 5633bcbc0929418f15d8bc331f63f2ed
relates to:
Issue Description:
This is a source compatibility bug.
A nested function used in an @escaping context must produce a type
checker error. In the example below, we expect a diagnostic:
Instead we get an error in diagnose exclusivity, but only in asserts builds, which is not good enough to protect against undefined behavior.
The text was updated successfully, but these errors were encountered: