I have a problem where the following OBJ-C method will not translate to Swift with optional return value:
- (nullable id)executeRequest:(ServerRequest *)request returningResponse:(__nullable NSURLResponse **__nullable)responseRef errorRef:(NSError **)errorRef
When trying to override that method in a swift class it translates to this:
override func executeRequest(request: ServerRequest, returningResponse responseRef: AutoreleasingUnsafeMutablePointer<NSURLResponse?>) throws -> AnyObject
Note that the return value is AnyObject instead of AnyObject?
What am I doing wrong here? I'm using X-Code 7 Beta 3
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire