brintos

brintos / llvm-project-archived public Read only

0
0
Text · 985 B · 807d4da Raw
64 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4@interface NSObject {}5 6@end7 8@interface MyClass : NSObject {}9 10@end11 12@interface MyClass (MyCategorie)13 14@end15 16@interface MySubClass : MyClass {}17 18@end19 20@interface MySubSubClass : MySubClass {}21 22@end23 24@implementation NSObject (NSObjectCategory)25- (void)rootMethod {}26@end27 28@implementation MyClass29 30+ (void)myClassMethod { }31- (void)myMethod { }32 33@end34 35@implementation MyClass (MyCategorie)36+ (void)myClassCategoryMethod { }37- (void)categoryMethod {}38@end39 40@implementation MySubClass41 42- (void)mySubMethod {}43 44- (void)myTest {45  [self mySubMethod];46  // should lookup method in superclass implementation if available47  [self myMethod];48  [super myMethod];49  50  [self categoryMethod];51  [super categoryMethod];52  53  // instance method of root class54  [MyClass rootMethod];55  56  [MyClass myClassMethod];57  [MySubClass myClassMethod];58  59  [MyClass myClassCategoryMethod];60  [MySubClass myClassCategoryMethod];61}62 63@end64