Obj-c method with null return value not matching correct conversion to swift
I am having an issue where the following OBJ-C method won't convert to Swift with an extra return value:
- (nullable id)executeRequest:(ServerRequest *)request returningResponse:(__nullable NSURLResponse **__nullable)responseRef errorRef:(NSError **)errorRef
When trying to override this method in the swift class, it converts 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 am using X-Code 7 Beta 3
+3
source to share
1 answer