1 // RUN: clang-cc -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;
37 int main (int argc, const char * argv[]) {
38 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
39 A *a = [[A new] autorelease];
40 B *b = [[B new] autorelease];
41 NSLog(@"%s", [b containsSelf:a] ? "YES" : "NO");