2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-02-26 19:32:02 +08:00
|
|
|
@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
|
2013-04-27 08:10:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
@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
|