minix/external/bsd/llvm/dist/clang/test/SemaObjC/protocol-lookup-2.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

57 lines
632 B
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
@interface NSObject @end
@protocol ProtocolA
+ (id)classMethod;
- (id)instanceMethod;
@end
@protocol ProtocolB <ProtocolA>
@end
@interface Foo : NSObject <ProtocolB>
@end
@interface SubFoo : Foo
@end
@implementation SubFoo
+ (id)method {
return [super classMethod];
}
- (id)method {
return [super instanceMethod];
}
@end
@protocol ProtC
-document;
@end
@interface I1 : NSObject
@end
@interface I1(cat)
-document;
@end
@interface I2 : NSObject
-document;
@end
@interface I2() <ProtC>
@end
@implementation I2
- document { return 0; }
@end