blob: e41a840c92241334a5b9e3ccf1fc7f194e62ab31 [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Steve Naroff1df62692008-10-22 19:16:27 +00003
4@interface NSSound
5@end
6@interface NSFont
7@end
8
9@interface NSSound (Adds)
10@end
11
12@implementation NSSound (Adds)
13- foo {
14 return self;
15}
16- (void)setFoo:obj {
17}
18@end
19
20@implementation NSFont (Adds)
21
22- xx {
23 NSSound *x;
24 id o;
25
Steve Naroffc4173fa2009-02-22 19:35:57 +000026 // GCC does *not* warn about the following. Since foo/setFoo: are not in the
27 // 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];
Steve Naroff1df62692008-10-22 19:16:27 +000030 o = x.foo;
31 [x setFoo:o];
32 x.foo = o;
Mike Stump753d1202009-07-22 00:43:08 +000033 return 0;
Steve Naroff1df62692008-10-22 19:16:27 +000034}
35
36@end
37