Created
April 4, 2012 00:50
-
-
Save aidansteele/2296782 to your computer and use it in GitHub Desktop.
clang-bug-or-pebkac?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
$ clang test.m | |
test.m:24:17: warning: incomplete implementation [-Wincomplete-implementation] | |
@implementation Test (TestCategory) | |
^ | |
test.m:24:17: warning: method in protocol not implemented [-Wprotocol] | |
test.m:17:1: note: method declared here | |
- (id)testMethod; | |
^ | |
test.m:21:12: note: required for direct or indirect protocol 'TestProtocol' | |
@interface Test (TestCategory) <TestProtocol> | |
^ | |
2 warnings generated | |
*/ | |
#import <Foundation/Foundation.h> | |
@interface Test : NSObject | |
- (id)testMethod; | |
@end | |
@implementation Test | |
- (id)testMethod; | |
{ | |
return nil; | |
} | |
@end | |
@protocol TestProtocol <NSObject> | |
- (id)testMethod; | |
- (id)secondMethod; | |
@end | |
@interface Test (TestCategory) <TestProtocol> | |
@end | |
@implementation Test (TestCategory) | |
- (id)secondMethod; | |
{ | |
return nil; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment