1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 typedef unsigned char BOOL;
14 @interface NSAutoreleasePool : NSObject
18 @interface A : NSObject {
24 @interface B : NSObject
25 - (BOOL)containsSelf:(A*)a;
32 - (BOOL)containsSelf:(A*)a {
33 return a->object == self;
39 int main (int argc, const char * argv[]) {
40 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
41 A *a = [[A new] autorelease];
42 B *b = [[B new] autorelease];
43 NSLog(@"%s", [b containsSelf:a] ? "YES" : "NO");