Declare protocol conformance with one category and implement it with another
| Originator: | heath.borders | ||
| Number: | rdar://11658751 | Date Originated: | 13-Jun-2012 01:49 PM |
| Status: | Open | Resolved: | |
| Product: | iPad SDK | Product Version: | 5.1 |
| Classification: | Other Bug | Reproducible: | Always |
13-Jun-2012 01:49 PM Heath Borders:
Summary:
clang reports an incorrect warning about a missing method implementation when I declare conformance to a protocol on one category and already have an implementation on another category.
I have the following class, category, and protocols:
@interface Test1 : NSObject
- (void) bar;
@end
@interface Test1(Foo)
- (void) foo;
@end
@protocol FooBar <NSObject>
- (void) foo;
@end
@interface Test1(FooBar)<FooBar>
@end
@implementation Test1(Foo)
- (void) foo {
}
@end
@implementation Test1(FooBar)
@end
Steps to Reproduce:
Build the above code in an objective-c file Test1.m
Expected Results:
Since Test1(Foo) is declared above Test1(FooBar), I would expect clang to see that implementation and not warn me.
Actual Results:
LLVM 3.1 warns that Test1(FooBar) does not implement foo despite Test1(Foo) implementing it.
Regression:
Notes:
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!