1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 typedef unsigned char BOOL;
15 @interface NSAutoreleasePool : NSObject
19 @interface A : NSObject {
25 @interface B : NSObject
26 - (BOOL)containsSelf:(A*)a;
33 - (BOOL)containsSelf:(A*)a {
34 return a->object == self;
40 int main (int argc, const char * argv[]) {
41 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
42 A *a = [[A new] autorelease];
43 B *b = [[B new] autorelease];
44 NSLog(@"%s", [b containsSelf:a] ? "YES" : "NO");