Closed ricardohg closed 5 years ago
Hello There, for some reason the protocol conformance method is calling itself instead of the default implementation here:
extension URLSession: URLSessionProtocol { func dataTask(with request: NSURLRequest, completionHandler: @escaping URLSessionProtocol.DataTaskResult) -> URLSessionDataTaskProtocol { return dataTask(with: request, completionHandler: completionHandler) } }
not sure what is wrong
Thanks, Ricardo.
https://github.com/koromiko/Tutorial/commit/966277f7dad9585d5d25328443ac5c84762bcfd6
Hi this might fix the ambiguous reference to the self functions (the cause of the infinite loop)
Hello There, for some reason the protocol conformance method is calling itself instead of the default implementation here:
extension URLSession: URLSessionProtocol { func dataTask(with request: NSURLRequest, completionHandler: @escaping URLSessionProtocol.DataTaskResult) -> URLSessionDataTaskProtocol { return dataTask(with: request, completionHandler: completionHandler) } }
not sure what is wrong
Thanks, Ricardo.