swiftlang/swift
No fix-it for escaping closure captures 'inout' parameter
Offen
#87.830 geöffnet am 12.03.2026
SILcapture listsclosurescompilerdiagnostics qualityexpressionsfix-itsgood first issueinoutswift 6.3value capturing
Repository-Metriken
- Stars
- (69.989 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 8T 17h) (510 gemergte PRs in 30 T)
Beschreibung
Description
No response
Reproduction
func bar(_: @escaping () -> Void) {}
func foo(_ i: inout Int) {
bar {
_ = i
}
}
Expected behavior
An additional note asking if the user wants to capture a copy, with a fix-it to capture the parameter explicitly.
Environment
Swift version 6.3-dev (fefcb257b5b5d32)
Additional information
No response