5
我在Objective-C中編寫了一組工具,Swift在某些時候會使用這些工具,所以我使用泛型和可空性。在這種情況下我該怎麼做?NSError,Swift和nullability
- (NSArray<MyObj *> * __nullable)foo:(NSError **)error;
目前我得到一個警告:Pointer is missing a nullability type specifier...
兩個三分球!我幾乎可以肯定,我不應該這樣做:
- (NSArray<MyObj *> * __nullable)foo:(NSError * __autoreleasing __nullable * __nullable)error;
我是嗎?