Xcode (LLVM) completely misses warnings for missing protocol @required methods

Originator:felipekellermann
Number:rdar://12428207 Date Originated:04-Oct-2012 01:41 AM
Status:Closed Resolved:-
Product:Xcode Product Version:4.5.1
Classification:Other Bug Reproducible:Always
 
04-Oct-2012 01:41 AM Felipe Kellermann:
Summary:
As is expected by all Objective-C developers, when a class "conforms" to a given protocol with some @required methods, the Xcode/LLVM should warn when there are any missing @required methods, providing a fundamental information to all developers that are using the iOS SDKs and other external SDKs.

The new Apple's "Programming with Objective-C" book explicitly indicates that "Once you’ve indicated conformance to a protocol, the class must at least provide method implementations for each of the required protocol methods, as well as any optional methods you choose. The compiler will warn you if you fail to implement any of the required methods".

Steps to Reproduce:
Create a simple project using 4.5 (or 4.5.1) and "conforms" to any protocol that contains @required methods, like the good old UITableViewDataSource, which contains two stub methods (please don't add the "conform" to a subclass of UITableViewController VC, do it using a standard one).

Expected Results:
Warning provided by LLVM and informed via Xcode.

Actual Results:
No Issues at all.

Regression:
4.4 worked fine.

Notes:
This is quite confusing especially for people trying to understand the conecepts of Objective-C and Cocoa programming. Even for advanced users, the issues/warnings for missing @required methods are always nice to keep things safe.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!