38 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4@interface NSSound5@end6@interface NSFont7@end8 9@interface NSSound (Adds)10@end11 12@implementation NSSound (Adds)13- foo {14 return self;15}16- (void)setFoo:obj {17}18@end19 20@implementation NSFont (Adds)21 22- xx {23 NSSound *x;24 id o;25 26 // GCC does *not* warn about the following. Since foo/setFoo: are not in the27 // class or category interface for NSSound, the compiler shouldn't find them.28 // For now, we will support GCC's behavior (sigh).29 o = [x foo];30 o = x.foo;31 [x setFoo:o];32 x.foo = o;33 return 0;34}35 36@end37 38