Clang wrongly warns about property impls in category with super impl
| Originator: | heath.borders | ||
| Number: | rdar://12568064 | Date Originated: | 24-Oct-2012 04:56 PM |
| Status: | Open | Resolved: | |
| Product: | iPad SDK | Product Version: | Version 4.5.1 (4G1004) |
| Classification: | Serious Bug | Reproducible: | Always |
24-Oct-2012 04:56 PM Heath Borders: Summary: If a class C and protocol P both define a property Q, and class D, which is a subclass of C, has a category E that makes D conform to P, clang warns that Q's implementation is missing, while it has been implemented by C. Steps to Reproduce: @interface C @property Q @end @protocol P @property Q @end @interface D : C @end @interface D(E)<P> @end @implementation D(E) // clang will warn that D(E) has no implementation of getP, setP:. @end Build and run the attached project, observe the warnings. Expected Results: There should be no warnings. Actual Results: These warnings exist: HBClass+HBCategory.m:11:17: Property 'myProperty' requires method 'myProperty' to be defined - use @dynamic or provide a method implementation in this category HBClass+HBCategory.m:11:17: Property 'myProperty' requires method 'setMyProperty:' to be defined - use @dynamic or provide a method implementation in this category Regression: I can workaround this by providing @dynamic myProperty. Notes: 24-Oct-2012 04:56 PM Heath Borders: 'ClangMissesSuperclassPropertyForProtocol.zip' was successfully uploaded
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!