How to get the right selector from URLSession.dataTask(with:completionHandler:) on Xcode 11.5?
问题 On Xcode 11.5 (Swift 5.2.4) the compiler gets confused and shows the error below: Cannot convert value of type '(URLSession) -> (URL, @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask' to type '(URLSession) -> (URLRequest, @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask' in coercion I'm trying to get the selector like follows, but the compiler still tries to convert to the version with URL instead: let selector = #selector(URLSession.dataTask(with