开发者

What does this LLVM 1.5 warning mean? "protocol qualifiers without 'id' is archaic"

I've just tried compiling an iOS project using the the LLVM 1.5 compiler (included in XCode 3.2.3), and I got a lot of new warnings, including several like this:

protocol qualifiers without 'id' is archaic

For instance, this happens on li开发者_开发技巧nes like this:

- (id)initWithContext:(NSManagedObjectContext *)context
          coordinator:(NSPersistentStoreCoordinator *)coordinator
             delegate:(<NSFetchedResultsControllerDelegate>)delegate;

Now, I think this is probably a "naming conventions" warning, but anyone know what it really means?


Archaic: extremely old or extremely old-fashioned.

The warning means a protocol qualifier (i.e. <NSFetchedResultsControllerDelegate>) without an id is deprecated. The delegate parameter's type should look like:

- (id)initWithContext:(NSManagedObjectContext *)context
          coordinator:(NSPersistentStoreCoordinator *)coordinator
             delegate:(id<NSFetchedResultsControllerDelegate>)delegate;
       //              ^^
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜