2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2008-10-23 03:16:27 +08:00
|
|
|
|
|
|
|
@interface NSSound
|
|
|
|
@end
|
|
|
|
@interface NSFont
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSSound (Adds)
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation NSSound (Adds)
|
|
|
|
- foo {
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
- (void)setFoo:obj {
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation NSFont (Adds)
|
|
|
|
|
|
|
|
- xx {
|
|
|
|
NSSound *x;
|
|
|
|
id o;
|
|
|
|
|
2009-02-23 03:35:57 +08:00
|
|
|
// GCC does *not* warn about the following. Since foo/setFoo: are not in the
|
|
|
|
// class or category interface for NSSound, the compiler shouldn't find them.
|
|
|
|
// For now, we will support GCC's behavior (sigh).
|
|
|
|
o = [x foo];
|
2008-10-23 03:16:27 +08:00
|
|
|
o = x.foo;
|
|
|
|
[x setFoo:o];
|
|
|
|
x.foo = o;
|
2009-07-22 08:43:08 +08:00
|
|
|
return 0;
|
2008-10-23 03:16:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|