### New Issue Checklist - [x] I've Updated SwiftLint to the latest version. - [x] I've searched for [existing GitHub issues](https://github.com/realm/SwiftLint/issues). ### Bug Description (fairly) minimal example I created: ```swift import Foundation public class Uploader { public func start(completion: @escaping (Result<String, Error>) -> Void) { DispatchQueue.global(qos: .userInitiated).async { let result: [Result<String, Error>] = [1].map { _ in .success("Success") } completion(result.first!) } } } ``` Running: ```bash swiftlint lint --only-rule unneeded_escaping --no-cache ./a.swift ``` Results in: ``` a.swift:5:35: warning: Unneeded Escaping Violation: @escaping attribute not required as 'completion' does not escape (unneeded_escaping) ``` but it cannot be removed: ```bash swift ./a.swift a.swift:6:57: error: escaping closure captures non-escaping parameter 'completion' ``` It somehow has todo with the map, because if I change the code to `let result = Result.success("Success")`, no error is reported anymore
Activity