Skip to content

Instantly share code, notes, and snippets.

@aidansteele
Created April 4, 2012 00:50
Show Gist options
  • Save aidansteele/2296782 to your computer and use it in GitHub Desktop.
Save aidansteele/2296782 to your computer and use it in GitHub Desktop.
clang-bug-or-pebkac?
/*
$ 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